Skip to content
Prev 387285 / 398502 Next

Making model predictions

Hello,

Are you looking for this?


newd <- data.frame(
   Class = '1st',
   Sex = 'Male',
   Age = 'Child'
)
predict(m, newdata = newd, type = 'raw')
#            No       Yes
#[1,] 0.3169345 0.6830655


With the default type = 'class' the result is

predict(m, newdata = newd)
#[1] Yes
#Levels: No Yes


Hope this helps,

Rui Barradas

?s 14:42 de 27/02/21, Jeff Reichman escreveu: