0
$\begingroup$

I know how to do prediction for classification trees, however I've never covered regression in class. What measures can you use as a prediction score,and how do you do it in R?

I've only done this so far;

    LEB_Tree <- rpart(formula = LEB ~ HDI + EYE + EGNI + LFPR + MYS, data = training_data)
$\endgroup$
0
$\begingroup$

I'm not familiar with rpart, but from the documentation and this link I think you want to use method="anova".

In general most regression trees support many scorers - (root) mean squared error is the standard for regression (predicts the conditional mean), but mean absolute error is common (predicts the conditional median) and you can also use quantile regression (predicts the $\alpha$ quantile) and many more.

For example catboost supports the following Regression: objectives and metrics and xgboost and lightgbm has a similar set or supported metrics.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.