Python - y should be a 1d array, got an array of shape instead

前端 未结 0 680
忘掉有多难
忘掉有多难 2020-12-06 19:26

Let\'s consider data :

import numpy as np
from sklearn.linear_model import LogisticRegression

x=np.linspace(0,2*np.pi,80)
x = x.reshape(-1,1)
y = np.sin(x)+n         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题