sci-kit learn: Reshape your data either using X.reshape(-1, 1)

后端 未结 6 1445
再見小時候
再見小時候 2021-02-04 20:56

I\'m training a python (2.7.11) classifier for text classification and while running I\'m getting a deprecated warning message that I don\'t know which line in my code is causin

6条回答
  •  不思量自难忘°
    2021-02-04 21:15

    Your 'vec' input into your clf.fit(vec,l).fit needs to be of type [[]], not just []. This is a quirk that I always forget when I fit models.

    Just adding an extra set of square brackets should do the trick!

提交回复
热议问题