Effacer les filtres
Effacer les filtres

how to write a trained fuzzy FIS tree to disk

1 vue (au cours des 30 derniers jours)
Andrey Puchkov
Andrey Puchkov le 5 Jan 2023
Granulator = mamfis('Name','Granulator','NumInputs',2,'NumOutputs',1);
Granulator.Inputs(1).Name = "G_inp1";
Granulator.Inputs(2).Name = "G_inp2";
Granulator.Outputs(1).Name = "G_out";
CTMCM = mamfis('Name','CTMCM','NumInputs',2,'NumOutputs',1);
CTMCM.Inputs(1).Name = "CTMCM_inp1";
CTMCM.Inputs(2).Name = "CTMCM_inp2";
CTMCM.Outputs(1).Name = "CTMCM_out";
OTF = mamfis('Name','OTF','NumInputs',2,'NumOutputs',1);
OTF.Inputs(1).Name = "OTF_inp1";
OTF.Inputs(2).Name = "OTF_inp2";
OTF.Outputs(1).Name = "OTF_out";
con1 = ["Granulator/G_out" "CTMCM/CTMCM_inp1"];
con2 = ["CTMCM/CTMCM_out" "OTF/OTF_inp1"];
tree = fistree([Granulator CTMCM OTF],[con1;con2]);
plotfis(tree) % FIS tree structure
X=rand(1000,5); % imitation of original data
nn=size(X);
nt=round(0.8*nn(1,1)); % training sample size
trnX = X(1:nt,1:4);
trnY = X(1:nt,end);
vldX = X(nt+1:end,1:4);
vldY = X(nt+1:end,end);
options = tunefisOptions;
options.Method = 'particleswarm';
options.OptimizationType = 'learning';
options.NumMaxRules = 10;
options.UseParallel = false;
options.MethodOptions.MaxIterations = 2;
rng('default')
fisout1 = tunefis(tree,[],trnX,trnY,options);
% writeFIS(fisout1,'fis1') % does not work
% writeFIS(tree,'fis1') % does not work
  2 commentaires
Andrey Puchkov
Andrey Puchkov le 5 Jan 2023
Hi all!
I can't write the tree of trained fuzzy inference systems to disk. At the bottom of the program are the options that I used. But they don't work...
Andrey Puchkov
Andrey Puchkov le 5 Jan 2023

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Fuzzy Inference System Modeling dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by