> The predict.rpart() function from the rpart library allows for
> calculating the class probabilities for a given test case instead of a
> discrete class label.
> How are these class probabilities derived? Is it simply the proportion
> of the majority class to all cases in a leaf node?
That is almost correct. If there are prior probabilities, it will be the
expected proportion of each class, accounting for priors. If there are no
priors, then the expected proportion = observed proportion.
Terry Therneau