2
$\begingroup$

I've built a toy Random Forest model in R (using the German Credit dataset from the caret package), exported it in PMML 4.0 and deployed onto Hadoop, using the Cascading Pattern library.

I've run into an issue where Cascading Pattern scores the same data differently (in a binary classification problem) than the same model in R. Out of 200 observations, 2 are scored differently.

Why is this? Could it be due to a difference in the implementation of Random Forests?

$\endgroup$

3 Answers 3

3
$\begingroup$

The difference was, it appears, due to the different implementation of Random Forests in R and Cascading Pattern (as well as openscoring which I tried later) with respect to ties in the tree voting - i.e. when an even number of trees are built (say, 500) and exactly half classify an application as Good, and the other half as Bad, the handling of those situations differs. Solved it by growing and odd (501) number of trees.

$\endgroup$
1
$\begingroup$

I think the most likely explanation is that the two libraries do not quite support TreeModel in PMML in the same way. Perhaps one only supports a subset of features, and ignores ones it does not understand. This could cause different scoring.

I'd also double check that upstream parsing code is the same in both cases. Maybe a missing value is treated differently upstream.

$\endgroup$
-1
$\begingroup$

Decision Trees are unstable learners and very sensitive to changes in the input parameters.

$\endgroup$
1
  • $\begingroup$ Eh, but the model is fixed here and serialized as PMML. The question is about scoring from a given fixed model. $\endgroup$
    – Sean Owen
    Oct 29, 2014 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.