フィルターのクリア

How to solve the error "Gaussian membership function must have positive sigma value"

14 ビュー (過去 30 日間)
Avijit Paul
Avijit Paul 2023 年 5 月 29 日
回答済み: Sam Chak 2023 年 8 月 5 日
I am getting this error, The code and the data set is attched. Note: The data set is huge therefore googledrive link is attached. Couldn't able to resolve the error. Also, is there any way to use different membership function while using Fuzzy Clustering Method (FCM). May be this can solve the issue.
Level=5;
[gcm_part1_coeff, gcm_part1_level]= wavedec(gcm_part1,Level,'db2');
[obs_part1_coeff, obs_part1_level]= wavedec(obs_part1,Level,'db2');
gcm_Approx1= appcoef(gcm_part1_coeff, gcm_part1_level,'db2');
obs_Approx1= appcoef(obs_part1_coeff, obs_part1_level,'db2');
option = genfisOptions("FCMClustering","NumClusters",2,"MaxNumIteration",200,"Verbose",0);
fis = genfis(gcm_Approx1,obs_Approx1,option);
opt = anfisOptions('InitialFIS',fis,'EpochNumber',60,'InitialStepSize',0.1, ...
'DisplayANFISInformation',0,'DisplayErrorValues',0,'DisplayStepSize',0, ...
'DisplayFinalResults',0);
fis2 = anfis([gcm_Approx1 obs_Approx1],opt);
Error using fismf/set.Parameters
Gaussian membership function must have positive sigma value.
Error in genfis3 (line 152)
mf(j).Parameters = computemfparams (mftype, Xin(:,i), U(j,:)', center(j,i));
Error in genfis (line 81)
fis = genfis3(Xin,Xout,option.FISType,option.NumClusters, ...
Error in Fuzzy_ANFIS (line 10)
fis = genfis(gcm_Approx1,obs_Approx1,option);
  1 件のコメント
林朝 潘
林朝 潘 2023 年 8 月 2 日
I'm getting a similar error with my program, is there any feasible solution?

サインインしてコメントする。

回答 (1 件)

Sam Chak
Sam Chak 2023 年 8 月 5 日
The error indicates that either you or your algorithm made a mistake by assigning a negative value to the sigma (standard deviation) in the Gaussian function. It is impossible to have a negative standard deviation because the sigma represents a measure of the spread or dispersion of the data, and it should always be a non-negative value as shown in this formula:
x = linspace(-1, 1, 20001);
sigma = 0.25; % standard deviation
mu = 0; % mean
y1 = gaussmf(x, [sigma mu]); % Gaussian MF
figure(1)
plot(x, y1, 'linewidth', 2), grid on, xlabel('x'),
y2 = gaussmf(x, [-sigma mu]); % Gaussian MF
Error using fuzzy.internal.utility.validateGaussMFParameterValues
Gaussian membership function must have positive sigma value.

Error in gaussmf (line 35)
fuzzy.internal.utility.validateGaussMFParameterValues(params)

カテゴリ

Help Center および File ExchangeFuzzy Logic Toolbox についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by