prtClassLogisticDiscriminant Logistic Discriminant classifier
CLASSIFIER = prtClassLogisticDiscriminant returns a LogisticDiscriminant classifier
CLASSIFIER = prtClassLogisticDiscriminant(PROPERTY1, VALUE1, ...) constructs a
prtClassLogisticDiscriminant object CLASSIFIER with properties as specified by
PROPERTY/VALUE pairs.
A prtClassLogisticDiscriminant object inherits all properties from the abstract class
prtClass. In addition is has the following properties:
wTolerance - The convergance tolerance of the weights
irlsStepSize - Step size used in training. Can be set to a
double, or 'hessian'. If 'hessian', IRLS is
solved using the Hessian to estimate steps.
maxIter - maximum IRLS iterations
nIterations - number of iterations used, set during training
wInitTechnique - Technique to initialize weights, can be set to
'FLD', 'randn', and 'manual'
manualInitialW - The values the weights are initialized to if
wInitTechnique is set to 'manual'
wTolerance - Convergence tolerance on weight vector
handleNonPosDefR - What to do when R is non-positive definte, can
be set to 'regularize' or 'exit'. When set to
regularize, the classifier will attempt to
regularize the matrix. When set to exit the
classifier will exit.
w - The regression weights, estimated during training
w(1) corresponds to the DC bias and w(2:end)
corresponds to the weights for the features
For more information on LogisticDiscriminant classifiers, refer to the
following URL:
http://en.wikipedia.org/wiki/Logistic_regression
A prtClassLogisticDiscriminant 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 = prtClassLogisticDiscriminant; % 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');