prtClassBinaryToMaryOneVsAll M-Ary Emulation Classifier
CLASSIFIER = prtClassBinaryToMaryOneVsAll returns a M-ary "one
versus all" classifier. A one versus all classifier utilizes a
binary classifier to make M-ary decisions. For all M classes, it
selects each class, and makes a binary comparison to all the
others.
CLASSIFIER = prtClassBinaryToMaryOneVsAll(PROPERTY1, VALUE1, ...)
constructs a prtClassBinaryToMaryOneVsAll object CLASSIFIER with
properties as specified by PROPERTY/VALUE pairs.
A prtClassBinaryToMaryOneVsAll object inherits all properties from the
abstract class prtClass. In addition is has the following
properties:
baseClassifier - The classifier to be used to make the binary
decisions. Must be a prtClass object, and defaults
to a prtClassLogisticDiscriminant classifier.
A prtClassBinaryToMaryOneVsAll object inherits the TRAIN, RUN,
CROSSVALIDATE and KFOLDS methods from prtAction. It also inherits
the PLOT method from prtClass.
Example:
TestDataSet = prtDataGenMary; % Create some test and
TrainingDataSet = prtDataGenMary; % training data
classifier = prtClassBinaryToMaryOneVsAll; % Create a classifier
classifier.baseClassifier = prtClassGlrt; % Set the binary
% Classifier
% Set the internal Decider
classifier.internalDecider = prtDecisionMap;
classifier = classifier.train(TrainingDataSet); % Train
classes = run(classifier, TestDataSet); % Test
% Evaluate, plot results
percentCorr = prtScorePercentCorrect(classes.getX,TestDataSet.getTargets)
classifier.plot;