view misc/SFXFeatureSelection.m @ 13:b398be42561d

analysing test data, making sense of the treeLinkFeature output and identifying large number of results with features 1 2 3 4 5
author DaveM
date Fri, 10 Feb 2017 18:13:29 +0000
parents b177d57ac0bd
children
line wrap: on
line source
tic
rng(1945,'twister')
options = statset('UseParallel', true);
b = TreeBagger(50, data, labels,'OOBVarImp','On', 'SampleWithReplacement', 'Off', 'FBoot', 0.632, 'Options', options);
% b = TreeBagger(500, DataTrain63, LabelsTrain,'OOBVarImp','On', 'SampleWithReplacement', 'Off', 'InBagFraction', 0.632, 'Options', options);
toc
figure
plot(oobError(b))
oobErr = oobError(b);
xlabel('Number of Grown Trees')
ylabel('Out-of-Bag Classification Error')
figure
bar(b.OOBPermutedVarDeltaError)
xlabel 'Feature Number'
ylabel 'Out-of-Bag Feature Importance'
FI = b.OOBPermutedVarDeltaError;
r = corrcoef(NormXtrain);
figure
imagesc(abs(r))
NormXtrainOld = NormXtrain;
idxvarOld = idxvar;
FeatureNamesOld = FeatureNames;
oobErrOld = oobErr;