annotate misc/SFXFeatureSelection.m @ 20:deac21432f0f
analysing results to produce taxonomy - add taxonomy
author |
DaveM |
date |
Tue, 21 Feb 2017 17:44:12 +0000 |
parents |
b177d57ac0bd |
children |
|
rev |
line source |
DaveM@2
|
1 tic
|
DaveM@2
|
2 rng(1945,'twister')
|
DaveM@2
|
3 options = statset('UseParallel', true);
|
DaveM@8
|
4 b = TreeBagger(50, data, labels,'OOBVarImp','On', 'SampleWithReplacement', 'Off', 'FBoot', 0.632, 'Options', options);
|
DaveM@8
|
5 % b = TreeBagger(500, DataTrain63, LabelsTrain,'OOBVarImp','On', 'SampleWithReplacement', 'Off', 'InBagFraction', 0.632, 'Options', options);
|
DaveM@2
|
6 toc
|
DaveM@2
|
7 figure
|
DaveM@2
|
8 plot(oobError(b))
|
DaveM@2
|
9 oobErr = oobError(b);
|
DaveM@2
|
10 xlabel('Number of Grown Trees')
|
DaveM@2
|
11 ylabel('Out-of-Bag Classification Error')
|
DaveM@2
|
12 figure
|
DaveM@2
|
13 bar(b.OOBPermutedVarDeltaError)
|
DaveM@2
|
14 xlabel 'Feature Number'
|
DaveM@2
|
15 ylabel 'Out-of-Bag Feature Importance'
|
DaveM@2
|
16 FI = b.OOBPermutedVarDeltaError;
|
DaveM@2
|
17 r = corrcoef(NormXtrain);
|
DaveM@2
|
18 figure
|
DaveM@2
|
19 imagesc(abs(r))
|
DaveM@2
|
20 NormXtrainOld = NormXtrain;
|
DaveM@2
|
21 idxvarOld = idxvar;
|
DaveM@2
|
22 FeatureNamesOld = FeatureNames;
|
DaveM@2
|
23 oobErrOld = oobErr; |