Skip to content

Puzzled at rpart prediction

2 messages · Ajay Shah, Uwe Ligges

#
I'm in a situation where I say:
0   1
173 0.8 0.2

which I interpret as meaning: an 80% chance of "0" and a 20% chance of
"1". Okay. This is consistent with:
[1] 0
Levels: 0 1

But I'm puzzled at the following. If I say:
173 
  1 

What gives?

I will be happy to packup a runnable demonstration for any of you, but
I wondered if it was just my lack of knowledge about "type" in
predict.rpart; wondered if there was a simple and logical explanation.
#
Ajay Narottam Shah wrote:

            
This means that the class of the first level is chosen, and the first 
level is "0".

Uwe Ligges