MATLAB File Help: prtClassMatlabTreeBagger
prtClassMatlabTreeBagger
  prtClassMatlabTreeBagger  TreeBagger classifier using the MATLAB function "treeBagger.m" (requires statistics toolbox)
 
   CLASSIFIER = prtClassMatlabTreeBagger returns a tree-bagger
   classifier build using the MATLAB Statistics toolbox (additonal 
   product, not included).  As an alternative, consider using
   prtClassTreeBaggingCap, which also implements a random forest
   classification scheme.
 
   A prtClassMatlabTreeBagger object inherits all properties from the
   abstract class prtClass. In addition is has the following
   properties:
  
    nTrees - The number of trees to use in the MATLAB TreeBagger
 
    treeBaggerParamValuePairs - A cell array of parameter value pairs
    to be passed to the MATLAB function "treeBagger". A complete list
    of the valid parameters and their allowed values can be found in
    the help entru for "treeBagger.m"
 
   % Example usage:
 
    TestDataSet = prtDataGenBimodal;       % Create some test and
    TrainingDataSet = prtDataGenBimodal;   % training data
    classifier = prtClassMatlabTreeBagger;           % Create a classifier
    classifier = classifier.train(TrainingDataSet);    % Train
    classified = run(classifier, TestDataSet);         % Test
    subplot(2,1,1);
    classifier.plot;
    subplot(2,1,2);
    [pf,pd] = prtScoreRoc(classified,TestDataSet);
    h = plot(pf,pd,'linewidth',3);
    title('ROC'); xlabel('Pf'); ylabel('Pd');
 
  % Example usage setting the treeBaggerParamValuePairs cell array:
    TestDataSet = prtDataGenBimodal;       % Create some test and
    TrainingDataSet = prtDataGenBimodal;   % training data
    classifier = prtClassMatlabTreeBagger('treeBaggerParamValuePairs',{'nVarToSample','all'});
    classifier = classifier.train(TrainingDataSet);    % Train
    classified = run(classifier, TestDataSet);         % Test
    subplot(2,1,1);
    classifier.plot;
    subplot(2,1,2);
    [pf,pd] = prtScoreRoc(classified,TestDataSet);
    h = plot(pf,pd,'linewidth',3);
    title('ROC'); xlabel('Pf'); ylabel('Pd');
Class Details
Superclasses prtClass
Sealed false
Construct on load false
Constructor Summary
prtClassMatlabTreeBagger TreeBagger classifier using the MATLAB function "treeBagger.m" (requires statistics toolbox) 
Property Summary
dataSet The training prtDataSet, only stored if verboseStorage is true.  
dataSetSummary Structure that summarizes prtDataSet. 
forest  
internalDecider Optional prtDecider object for making decisions 
isCrossValidateValid True 
isNativeMary False 
isSupervised True 
isTrained Indicates if prtAction object has been trained. 
nTrees The number of trees 
name MATLAB Tree Bagger 
nameAbbreviation MLTB 
showProgressBar  
treeBaggerParamValuePairs  
twoClassParadigm Whether the classifier retures one output (binary) or two outputs (m-ary) when there are only two unique class labels 
userData User specified data 
verboseStorage Specifies whether or not to store the training prtDataset. 
Method Summary
  crossValidate Cross validate prtAction using prtDataSet and cross validation keys. 
  get get the object properties 
  kfolds Perform K-folds cross-validation of prtAction 
  optimize Optimize action parameter by exhaustive function maximization. 
  plot Plot the output confidence of a prtClass object 
  run Run a prtAction object on a prtDataSet object. 
  set set the object properties 
  train Train a prtAction object using training a prtDataSet object.