Warning using " anfis " function in training of my data

3 ビュー (過去 30 日間)
Mhmmd Sjj
Mhmmd Sjj 2021 年 9 月 12 日
コメント済み: Yundi Huang 2021 年 11 月 12 日
I want to train an ANFIS structure. I have 8 inputs and one corrosponding output. When I train these data with "anfis" function, I will get the following error :
Warning: Generated rule base is large. MATLAB may run out of memory if this FIS is tuned using ANFIS.
> In genfis1 (line 161)
In genfis (line 61)
In ANFIS (line 39)
ANFIS info:
Number of nodes: 555
Number of linear parameters: 2304
Number of nonlinear parameters: 48
Total number of parameters: 2352
Number of training data pairs: 501
Number of checking data pairs: 0
Number of fuzzy rules: 256
Warning: Number of training data is smaller than number of modifiable parameters.
> In anfis>trainFIS (line 190)
In anfis>anfisWithOptionalInputs (line 326)
In anfis (line 69)
In ANFIS (line 40)
Start training ANFIS ...
And the result will go to infinity. Note that I do not want to scale my data and I need the corrosponding output which is a vector, the values of which should be between zero and one. What should I do to solve this problem ?
the following is my ANFIS code :
clc;clear;close all;
%% 1. Load Data
Data = load('data_0_to_50_smooth');
t = Data.t;
u1 = Data.u1; % Vaccination
u2 = Data.u2; % Social Distancing
u3 = Data.u3; % TreatMent Rate
states = Data.y;
states = states';
data1 = [states u1];
data2 = [states u2];
data3 = [states u3];
%% 2. Create First FiS
NumMfs = 2;
InMfsType ='trimf';
OutMfsType = 'linear';
Xin1 = data1(:,1:end-1);
Xout1 = data1(:,end);
radii = 0.2;
EpochNumber = 100;
ErrorGoal = 0.001;
StepSize =0.35;
StepSizeDecreaseRate =0.85;
StepSizeIncreaseRate = 1.15;
TrainOptions = [EpochNumber,ErrorGoal,...
StepSize,StepSizeDecreaseRate,...
StepSizeIncreaseRate];
% Fis1 = genfis1(data1,NumMfs,InMfsType,OutMfsType);
Fis1 = genfis(data1(:,1:end-1),data1(:,end));
Fis1 = anfis(data1,Fis1);
out1 = evalfis(Fis1,data(:,1:end-1),TrainOptions);
The data I used for this problem is attached.
  1 件のコメント
Yundi Huang
Yundi Huang 2021 年 11 月 12 日
hi! I met the same question, have you solve the problem yet?

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

回答 (0 件)

カテゴリ

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