how to write a trained fuzzy FIS tree to disk
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Andrey Puchkov
el 6 de En. de 2023
Comentada: Andrey Puchkov
el 6 de Dic. de 2024
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...
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1254287/image.png)
0 comentarios
Respuesta aceptada
Govind KM
el 6 de Dic. de 2024
Hi Andrey,
Support for saving a FIS tree object to a MAT file using the writeFIS function has been added in MATLAB R2024b. I would recommend upgrading your MATLAB version to R2024b to save FIS tree objects as per your workflow.
Más respuestas (0)
Ver también
Categorías
Más información sobre Fuzzy Logic Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!