How can I define the cost matrix using Classify function for discriminant analysis classification in MATLAB R2009a?

1 view (last 30 days)
Hi Dear,
I am using MATLAB version R2009a. I want to set the cost matrix for false negatives and positievs with some values other than one. Can I change the cost matrix in 'classify' function like the one in decision tree classifier?
Thank you

Answers (1)

Ilya
Ilya on 1 May 2013
One option is to upgrade. In 11b, we introduced ClassificationDiscriminant which accepts the cost option.
Otherwise take a look here: http://www.mathworks.com/help/stats/discriminant-analysis.html#bs31lmr This describes how discriminant computes predictions using the cost matrix. Unlike for decision tree, the cost has no effect on the computation of the discriminant coefficients. That's why you can apply the cost correction to the posterior probability estimates you get from classify (3rd output).

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!