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

后端 未结 6 1439
再見小時候
再見小時候 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:32

    Since 1D array would be deprecated. Try passing 2D array as a parameter. This might help.

    clf = joblib.load('model.pkl') 
    pred = clf.predict([vec]);
    

提交回复
热议问题