-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.m
148 lines (131 loc) · 3.39 KB
/
run.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
addpath('utils');
addpath('helpers');
% EXPERIMENTS
%% -----------
disp('DERMATOLOGY')
load('bases/dermatology.mat');
train_data = derm_train_data;
train_labels = derm_train_labels;
test_data = derm_test_data;
test_labels = derm_test_labels;
dim = 6;
eta = 10;
lambda = 1;
run_for_selected_database;
derm_acc_pca = acc_pca;
derm_acc_lda = acc_lda;
derm_dpca_results = dpca_results;
save('bases/dermatology/results.mat', 'derm_acc_pca', 'derm_acc_lda', 'derm_dpca_results');
clear;
%% -----------
disp('HORSE')
load('bases/horse.mat');
train_data = horse_train_data;
train_labels = horse_train_labels;
test_data = horse_test_data;
test_labels = horse_test_labels;
dim = 2;
eta = 1;
lambda = 1;
run_for_selected_database;
horse_acc_pca = acc_pca;
horse_acc_lda = acc_lda;
horse_dpca_results = dpca_results;
save('bases/horse/results.mat', 'horse_acc_pca', 'horse_acc_lda', 'horse_dpca_results');
clear;
%% -----------
disp('IRIS')
load('bases/iris.mat');
train_data = iris_train_data;
train_labels = iris_train_labels;
test_data = iris_test_data;
test_labels = iris_test_labels;
dim = 3;
eta = 1;
lambda = 1;
run_for_selected_database;
iris_acc_pca = acc_pca;
iris_acc_lda = acc_lda;
iris_dpca_results = dpca_results;
save('bases/iris/results.mat', 'iris_acc_pca', 'iris_acc_lda', 'iris_dpca_results');
clear;
%% -----------
disp('LYMPH')
load('bases/lymphography.mat');
train_data = lymph_train_data;
train_labels = lymph_train_labels;
test_data = lymph_test_data;
test_labels = lymph_test_labels;
dim = 4;
eta = 10;
lambda = 1;
run_for_selected_database;
lymph_acc_pca = acc_pca;
lymph_acc_lda = acc_lda;
lymph_dpca_results = dpca_results;
save('bases/lymphography/results.mat', 'lymph_acc_pca', 'lymph_acc_lda', 'lymph_dpca_results');
clear;
%% -----------
disp('SONAR')
load('bases/sonar.mat');
train_data = sonar_train_data;
train_labels = sonar_train_labels;
test_data = sonar_test_data;
test_labels = sonar_test_labels;
eta = 1;
lambda = 1;
dim = 2;
run_for_selected_database;
sonar_acc_pca = acc_pca;
sonar_acc_lda = acc_lda;
sonar_dpca_results = dpca_results;
save('bases/sonar/results.mat', 'sonar_acc_pca', 'sonar_acc_lda', 'sonar_dpca_results');
clear;
%% -----------
% disp('SOYBEAN')
% load('bases/soybean.mat');
% train_data = soy_train_data;
% train_labels = soy_train_labels;
% test_data = soy_test_data;
% test_labels = soy_test_labels;
% eta = 10;
% lambda = 1;
% dim = 4;
% run_for_selected_database;
% soy_acc_pca = acc_pca;
% soy_acc_lda = acc_lda;
% soy_dpca_results = dpca_results;
% save('bases/soybean/results.mat', 'soy_acc_pca', 'soy_acc_lda', 'soy_dpca_results');
% clear;
%% -----------
% disp('VOWEL')
% load('bases/vowel.mat');
% train_data = vowel_train_data;
% train_labels = vowel_train_labels;
% test_data = vowel_test_data;
% test_labels = vowel_test_labels;
% eta = 1;
% lambda = 1;
% dim = 10;
% run_for_selected_database;
% vowel_acc_pca = acc_pca;
% vowel_acc_lda = acc_lda;
% vowel_dpca_results = dpca_results;
% save('bases/vowel/results.mat', 'vowel_acc_pca', 'vowel_acc_lda', 'vowel_dpca_results');
% clear;
%% -----------
disp('WINE')
load('bases/wine.mat');
train_data = wine_train_data;
train_labels = wine_train_labels;
test_data = wine_test_data;
test_labels = wine_test_labels;
eta = 10;
lambda = 1;
dim = 3;
run_for_selected_database;
wine_acc_pca = acc_pca;
wine_acc_lda = acc_lda;
wine_dpca_results = dpca_results;
save('bases/wine/results.mat', 'wine_acc_pca', 'wine_acc_lda', 'wine_dpca_results');
clear;