-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.m
62 lines (56 loc) · 1.82 KB
/
Main.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
clc;clear;close all;warning off;
AddPath();
%% Input data
Data=LoadData(0.7);
%% Fis initialization
FisCreateingMood=0;
if(FisCreateingMood)
Fis=Fis_Initialization(Data,10);
save('_Fis.mat','Fis');
else
load('_Fis.mat');
end
%% Train phase
Index=6;
if(Index==1)%Train with ACOR
[Fis,Result]=Fis_Train_ACOR(Fis,Data);
save('_Output_ACOR.mat','Fis','Result');
elseif(Index==2)%Train with DE
[Fis,Result]=Fis_Train_DE(Fis,Data);
save('_Output_DE.mat','Fis','Result');
elseif(Index==3)%Train with PSO
[Fis,Result]=Fis_Train_PSO(Fis,Data);
save('_Output_PSO.mat','Fis','Result');
elseif(Index==4)%Train with TLBO
[Fis,Result]=Fis_Train_TLBO(Fis,Data);
save('_Output_TLBO.mat','Fis','Result');
elseif(Index==5) %Train with WOA
[Fis,Result]=Fis_Train_WOA(Fis,Data);
save('_Output_WOA.mat','Fis','Result');
elseif(Index==6) %Train with KA
[Fis,Result]=Fis_Train_KA(Fis,Data);
save('_Output_KA.mat','Fis','Result');
elseif(Index==7) %Train with ICA
[Fis,Result]=Fis_Train_ICA(Fis,Data);
save('_Output_ICA.mat','Fis','Result');
elseif(Index==8) %Train with GA
[Fis,Result]=Fis_Train_GA(Fis,Data);
save('_Output_GA.mat','Fis','Result');
elseif(Index==9) %Train with FA
[Fis,Result]=Fis_Train_FA(Fis,Data);
save('_Output_FA.mat','Fis','Result');
elseif(Index==10) %Train with hs
[Fis,Result]=Fis_Train_HS(Fis,Data);
save('_Output_HS.mat','Fis','Result');
elseif(Index==11) %Train with AIA
[Fis,Result]=Fis_Train_AIA(Fis,Data);
save('_Output_AIA.mat','Fis','ReHSlt');
end
% fuzzy(fis);
%% Show result
% Train Data
% TrainOutputs=evalfis(Data.TrainInputs,Fis);
% PlotResults(Data.TrainTargets,TrainOutputs,'Train Data');
% Test Data
% TestOutputs=evalfis(Data.TestInputs,Fis);
% PlotResults(Data.TestTargets,TestOutputs,'Test Data');