Sklearn - Cannot use encoded data in Random forest classifier

后端 未结 1 2027
轻奢々
轻奢々 2021-01-26 21:32

I\'m new to scikit-learn. I\'m trying use preprocessing. OneHotEncoder to encode my training and test data. After encoding I tried to train Random forest classifier using that d

相关标签:
1条回答
  • 2021-01-26 22:09

    sklearn random forests do not work on sparse input and your dataset shape is to large and too sparse for a dense version to fit in memory.

    You probably have some categorical features with a much to large cardinality (for instance a free text field or unique entry ids). Try to drop those features and start over.

    0 讨论(0)
提交回复
热议问题