Is there a way to force an RPART model to use a certain variable?

时间:2019-04-23 15:13:11

标签: r rpart

I'm running a model using rpart, which ends up actually abandoning one of the main independent variables in its final tree. Is there a way to force usage of that variable?

model <- rpart(dependent ~  desiredforcevar + var2 + var3, method="class", data=df_smote)

0 个答案:

没有答案