I'm trying to make a random forest with the following
movies.rf <- randomForest(Infl.Adj.Dom.BoxOffice~. -Genre -Source -ProductionMethod -CreativeType, data=Movies, subset=train)
I get
Error in randomForest.default(m, y, ...) : Can not handle categorical predictors with more than 53 categories.
After reading this I tried to check the values of my variables and got this
>length(unique(Movies$Genre))
[1] 12
> length(unique(Movies$Source))
[1] 16
> length(unique(Movies$ProductionMethod))
[1] 5
> length(unique(Movies$CreativeType))
[1] 9
Individually, none of them is greater than 53, and added together, they are less than 53. So why do I still get the error?