-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmakeFigure_12_LIBS.m
More file actions
executable file
·57 lines (45 loc) · 1.26 KB
/
makeFigure_12_LIBS.m
File metadata and controls
executable file
·57 lines (45 loc) · 1.26 KB
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
%%
clear all;
close all;
clc;
load libsCoinData.mat ds
ds = rt( prtPreProcEnergyNormalizeRows + prtPreProcPca('nComponents',2), ds);
%%
plsda = prtClassPlsda;
logDisc = prtClassBinaryToMaryOneVsAll('baseClassifier',prtClassLogisticDiscriminant);
rvm = prtClassBinaryToMaryOneVsAll('baseClassifier',prtClassRvm);
knn = prtClassKnn;
plsda = plsda.train(ds);
logDisc = logDisc.train(ds);
rvm = rvm.train(ds);
knn = knn.train(ds);
subplot(2,2,1); plot(plsda);
legend off;
set(gca,'xtick',[]);
set(gca,'ytick',[]);
title('PLSDA');
subplot(2,2,2); plot(logDisc);
legend off;
set(gca,'xtick',[]);
set(gca,'ytick',[]);
title('Logistic Disc');
subplot(2,2,3); plot(rvm);
legend off;
set(gca,'xtick',[]);
set(gca,'ytick',[]);
title('RVM');
subplot(2,2,4); plot(knn);
legend off;
set(gca,'xtick',[]);
set(gca,'ytick',[]);
title('KNN');
% s2({'png','fig'},'libsChapter_Fig12_ContoursLibs');
%%
yOutPlsda = rt(prtDecisionMap,plsda.kfolds(ds,3));
yOutLogDisc = rt(prtDecisionMap,logDisc.kfolds(ds,3));
yOutRvm = rt(prtDecisionMap,rvm.kfolds(ds,3));
yOutKnn = rt(prtDecisionMap,knn.kfolds(ds,3));
prtScorePercentCorrect(yOutPlsda)
prtScorePercentCorrect(yOutLogDisc)
prtScorePercentCorrect(yOutRvm)
prtScorePercentCorrect(yOutKnn)