-
Notifications
You must be signed in to change notification settings - Fork 0
/
acor1.m
38 lines (30 loc) · 731 Bytes
/
acor1.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
clc;
clear;
close all;
%% Load Data
data=CreateData();
load traininput.mat
load traintarget.mat
load testinput.mat
load testtarget.mat
data.TrainInputs=0;
data.TrainInputs=traininput;
data.TrainTargets=0;
data.TrainTargets=traintarget;
data.TestInputs=0;
data.TestInputs=testinput;
data.TestTargets=0;
data.TestTargets=testtarget;
%% Generate Basic FIS
fis=CreateInitialFIS(data,10);
%% Tarin Using ACOR
fis=TrainUsingACOR(fis,data);
%% Results
% Train Data
figure;
TrainOutputs=evalfis(data.TrainInputs,fis);
PlotResults(data.TrainTargets,TrainOutputs,'Train Data');
figure;
% Test Data
TestOutputs=evalfis(data.TestInputs,fis);
PlotResults(data.TestTargets,TestOutputs,'Test Data');