0

In R, rpart function allows me to set different class priors through 'parms'. How do I set this while using the train function in caret?

Lluís Ramon
  • 576
  • 4
  • 7
KTY
  • 709
  • 1
  • 9
  • 17

1 Answers1

0

You include it inside train function.

As example:

library("caret")

train(Kyphosis ~ Age + Number + Start, data = kyphosis, method = "rpart",
          parms = list(prior = c(0.65, 0.35)))
Lluís Ramon
  • 576
  • 4
  • 7