Skip to content

unexpected behavior of rpart 3.1-43, loss matrix

1 message · Liaw, Andy

#
Just expressing MHO:  The  algorithm cannot give predictions in classes
that never appear in the training data, so any entries in the loss
matrix related to such classes are irrelevant w.r.t. the training data.
They should be removed before feeding to rpart (or any other algorithm
that can make use of a loss matrix).  As I see it, it's the
responsibility of the data analyst to take care of such things.  The
current error message may not make it obvious what the problem is, but
if I were the developer, I would not write the code to accept such
disparate input without issuing error.

Andy
Notice:  This e-mail message, together with any attachme...{{dropped:12}}