view misc/SFXFeatureSelection.m @ 2:985cd163ba54

adding old matlab data some datasets
author DaveM
date Thu, 09 Feb 2017 16:48:03 +0000
parents
children b177d57ac0bd
line wrap: on
line source
tic
rng(1945,'twister')
options = statset('UseParallel', true);
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;