# HG changeset patch # User DaveM # Date 1486664084 0 # Node ID 7848d183c7ab689ce1541643ff5f08424af8a02b # Parent 7ec9bd8df11100416e4971001e67d1713a9dc4db fixing comments diff -r 7ec9bd8df111 -r 7848d183c7ab phase2/rfFeatureSelection.m --- a/phase2/rfFeatureSelection.m Thu Feb 09 18:11:51 2017 +0000 +++ b/phase2/rfFeatureSelection.m Thu Feb 09 18:14:44 2017 +0000 @@ -7,16 +7,23 @@ % labels is the set of labels for the data % numFeatures is the dimension of the output vector (default 5) % iterMethod is the method for which the features are cut down -% 'onePass' will simply select the top (numFeatures) features and -% report them -% 'cutX' will iteratively cut the bottom X percent of features out, -% and perform random forest feature selection on the new set, until -% the desired number of features has been returned -% 'oobErr' will do something with the out-of-bag error, and return +% * 'onePass' will simply select the top (numFeatures) features and +% report them +% * 'cutX' will iteratively cut the bottom X percent of +% features out, and perform random forest feature selection on the +% new set, until the desired number of features has been returned +% * 'oobErr' will do something with the out-of-bag error, and return % that in some way, but this has not been implemented yet. -% 'featureDeltaErr' will do something with the feature importance -% prediction error, and return that in some way, but this has not -% been implemented yet. +% * 'featureDeltaErr' will do something with the feature importance +% prediction error, and return that in some way, but this has not +% been implemented yet. The OOBPermutedVarDeltaError property is a +% numeric array of size 1-by-Nvars containing a measure of importance +% for each predictor variable (feature). For any variable, the +% measure is the increase in prediction error if the values of that +% variable are permuted across the out-of-bag observations. This +% measure is computed for every tree, then averaged over the entire +% ensemble and divided by the standard deviation over the entire +% ensemble. if(length(labels) ~= size(data,1)) error('labels and data do not match up'); @@ -57,6 +64,7 @@ features = features(1:numFeatures); elseif(strcmp(iterMethod,'featureDeltaErr')) warning('This method has not been implemented yet, using onePass to return results') + % this will use variable FI features = features(1:numFeatures); end end \ No newline at end of file