MATLAB File Help: prtClassBagging
prtClassBagging
  prtClassBagging  Bagging (Bootstrap Aggregating) classifier
 
     CLASSIFIER = prtClassBagging returns a bagging classifier
 
     CLASSIFIER = prtClassBagging(PROPERTY1, VALUE1, ...) constructs a
     prtClassBagging object CLASSIFIER with properties as specified by
     PROPERTY/VALUE pairs.
 
     A prtClassBagging object inherits all properties from the abstract
     class prtClass. In addition is has the following properties:
 
     baseClassifier  - The base classifier to be used 
     nBags           - The number of bags to aggregate over
     nSamplesPerBag  - The number of bootstrap samples to use per bag.
            When nSamplesPerBag is an empty matrix (the default),
            the number of bootstrap samples is set to the number of
            observations in the training data set.
     bootstrapByClass - A logical describing whether to enforce an
            equal number of bootstrap samples from each class in the
            training data set. If bootstrapByClass is true,
            floor(nSamplesPerBag/nClasses) samples per class are used
            when training each classifier.  bootstrapByClass defaults
            to false.
  
     Bagging classifiers are meta-classifiers that attempt to develop
     more robust decision boundaries by aggregating outputs over
     multiple bootstrapped samples of the original data.  For more
     information on bagging classifiers, see:
 
     http://en.wikipedia.org/wiki/Bootstrap_aggregating
 
     A prtClassBagging  object inherits the TRAIN, RUN, 
     CROSSVALIDATE and KFOLDS methods from prtAction. It also inherits 
     the PLOT method from prtClass.
 
     Example:
 
      TestDataSet = prtDataGenUnimodal;       % Create some test and
      TrainingDataSet = prtDataGenUniModal;   % training data
      classifier = prtClassBagging;           % Create a classifier
      classifier.baseClassifier = prtClassMap; % Set the classifier to
                                               % a prtClassMap
      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');
See also
Class Details
Superclasses prtClass
Sealed false
Construct on load false
Constructor Summary
prtClassBagging Bagging (Bootstrap Aggregating) classifier 
Property Summary
baseClassifier The classifier to be bagged 
bootstrapByClass Whether to force an equal number of bootstrap samples per class 
dataSet The training prtDataSet, only stored if verboseStorage is true.  
dataSetSummary Structure that summarizes prtDataSet. 
internalDecider Optional prtDecider object for making decisions 
isCrossValidateValid True 
isNativeMary False 
isSupervised True 
isTrained Indicates if prtAction object has been trained. 
nBags The number of bags 
nSamplesPerBag The number of bootstrap samples to use in each bag 
name Required by prtAction 
nameAbbreviation Bagging 
showProgressBar  
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.