0
$\begingroup$

I am using a Random Forest model for predicting a target variable wich is basincally 1 and 0 (I have created a dummie variable from a categorical variable). But after running the model I get a predicted variable wich is not only 1 and 0 (as expected) but some values in between (0.something). How can I restrict the predicted value to only 1 and 0? Thanks!!

$\endgroup$

1 Answer 1

0
$\begingroup$
  • Are you sure that you are not incorrectly using the regression variant of random forest, instead of the classification one?
  • It is also possible that your software returns soft classifications, the scores, where you need to pick a threshold to make the hard classifications (zeroes and ones).
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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