AttributeError: 'Series' object has no attribute 'reshape'

前端 未结 3 1635
情歌与酒
情歌与酒 2021-02-03 17:45

I\'m using sci-kit learn linear regression algorithm. While scaling Y target feature with:

Ys = scaler.fit_transform(Y)

I got

3条回答
  •  迷失自我
    2021-02-03 18:20

    Solution was linked on reshaped method on documentation page.

    Insted of Y.reshape(-1,1) you need to use:

    Y.values.reshape(-1,1)
    

提交回复
热议问题