Error coming while using Random Forest using R

后端 未结 4 1500
自闭症患者
自闭症患者 2020-12-20 21:17

I am using a dataset containing mvar_1 as column, having names of one of 5 parties that citizen voted for last year. Other variables are just demographic variab

4条回答
  •  被撕碎了的回忆
    2020-12-20 21:52

    As antoine-sac pointed out, in my case this error was because of numeric variables appearing as factors. Only that the conversion happened by R when it was importing my (numeric) file.

    Casting the factors as numerics didn't work. But what worked was using strip.white = TRUE when importing the dataset. (I found this solution here.)

提交回复
热议问题