MemoryError in toarray when using DictVectorizer of Scikit Learn

后端 未结 7 2041
無奈伤痛
無奈伤痛 2021-01-06 05:47

I am trying to implement the SelectKBest algorithm on my data to get the best features out of it. For this I am first preprocessing my data using DictVectorizer and the data

7条回答
  •  囚心锁ツ
    2021-01-06 06:40

    I figured out the problem.

    When I removed a column which had a very high cardinality the DictVectorizer works fine. That column had like millions of different unique values and hence the dictvectorizer was giving a memory error.

提交回复
热议问题