How to remove error can't have empty classes in y in random forest

r
random_forest

#1

Hello,

While using random forests for a classification task I came across an error:

None of the rows in the y are empty.
What does this mean and how to remove it??


#2

@pagal_guy - I think it is because of not having factors in the outcome try to convert the promotion_name to the factor.

Hope this helps!

Regards,
Hinduja