Solved – Loss matrix to be included in decision tree? Rpart -R

cartdecision-theoryrrpart

For loss matrix, is it necessary to include it during the decision tree analysis ?
What will be the impact if this is excluded from the analysis e.g loss matrix (0,1,1,0) in Rpart-R? Do we usually use this modified loss matrix as the final version? I have done a default tree and modified loss matrix (0,4,1,0). Both models give pretty high accuracy of 70+% under confusion matrix.

Best Answer

Yes, the loss matrix should be used when growing the tree (why else would one define a custom loss matrix?). Different loss matrices likely (but not necessarily) yield different splits.

Do we usually use this modified loss matrix as the final version?

I don't see why you would change the loss matrix after growing the tree. The loss matrix is something you decide on a-priori, you don't change it after the analysis.

With the loss matrix you mention, the cost of a false negative is 4 times as high as the cost of a false positive (or the other way around). You should take this into account when calculating the accuracy. If the accuracy you report here is the correct classification rate, it may not be the most suitable measure of accuracy and you should use a weighted correct classification rate.

Related Question