-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.m
80 lines (64 loc) · 1.79 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
%importing data from text files
data = csvread('Data/data.txt'); % training data
valdata = csvread('Data/valdata.txt'); % validation data
%display(data);
display('done importing....');
%data preprocessing
dColumn1 = data(:,1);
dColumn2 = data(:,2);
vColumn1 = valdata(:,1);
vColumn2 = valdata(:,2);
%display(column1);
%display(column2);
%%add configuration parameters here
[m, n] = size(data); % size of your data
windowsize = 10; % size of your predicition window
previousWindow = dColumn1(end); % the value of the last prediction window
%% Initial Exploration of Data
x=input('Do you want to visualize the data?(y == yes else ==no): ','s');
if (x=='y' || x=='Y')
plot(dColumn1, dColumn2);
title('Period VS Load','Fontsize', 12,'color','r');
xlabel('Period'); ylabel('Load');
end
%% forecasting models menu
again='y';
while (again =='y' || again=='Y')
clc;
display('**********************************************************');
display(' (1) Naive');
display(' (2) Average');
display(' (3) Maximum');
display(' (4) Minimum');
display(' (5) Fft');
display(' (6) Regression Trees Model');
display(' (7) SVR');
display(' (8) NN');
display('**********************************************************');
model=0;
while (model<1 || model>9),
model = input('Choose the desired model from the menu above: ');
end
switch(model)
case 1
run('Naive');
case 2
run('Average');
case 3
run('Maximum');
case 4
run('Minimum');
case 5
run('Fft');
case 6
run('Regression_tree');
case 7
run('Svr');
case 8
run('NN_model');
otherwise
display('!Error');
return;
end
again=input('\n\n Do you want to use another model?(y==Yes, n==No): ','s');
end