Mercurial > hg > scatter_reeval
comparison reeval/classification/perform_classification.m @ 4:a1f6a08f624c tip
Completed version 0.0.2
author | Francisco Rodriguez Algarra <f.rodriguezalgarra@qmul.ac.uk> |
---|---|
date | Tue, 03 Nov 2015 21:24:41 +0000 |
parents | b1cd83874633 |
children |
comparison
equal
deleted
inserted
replaced
3:06a2a18a3960 | 4:a1f6a08f624c |
---|---|
1 function [results] = perform_classification(experiment, db, condition) | 1 function [results] = perform_classification(experiment, db, condition) |
2 | 2 |
3 db = svm_calc_kernel(db,'gaussian','square',1:8:size(db.features,2)); | 3 db = svm_calc_kernel(db,'gaussian','square',1:8:size(db.features,2)); |
4 | |
4 | 5 |
5 optt.kernel_type = 'gaussian'; | 6 optt.kernel_type = 'gaussian'; |
6 optt.C = 2.^[0:4:8]; | 7 optt.C = 2.^[0:4:8]; |
7 optt.gamma = 2.^[-16:4:-8]; | 8 optt.gamma = 2.^[-16:4:-8]; |
8 optt.search_depth = 3; | 9 optt.search_depth = 3; |
9 optt.full_test_kernel = 1; | 10 |
11 % This causes the accuracy to be lower than it could! | |
12 switch(experiment) | |
13 case('time_scat_l3') | |
14 optt.full_test_kernel = 0; | |
15 otherwise | |
16 optt.full_test_kernel = 1; | |
17 end | |
18 | |
19 % | |
10 | 20 |
11 if nargin < 3 | 21 if nargin < 3 |
12 condition = cellstr(['none '; 'fault']); | 22 condition = cellstr(['none '; 'fault']); |
23 else | |
24 condition = cellstr(condition); | |
13 end | 25 end |
14 | 26 |
15 for ii=1:length(condition) | 27 for ii=1:length(condition) |
16 | 28 |
17 [train_set,test_set] = createFolds(condition{ii}); | 29 [train_set,test_set] = createFolds(condition{ii}); |