m = np.array([[1,5,3,6,10,20]])
c = np.array([[100,500,300,600,1000,2000]])
model = LinearRegression()
model.fit(m,c)
I get the error when trying to make the prediction.
model.predict([5])
If I add double brackets, it forces me to pass 6 inputs, but the idea is that it receives only one or as many as I want.
model, bit you predict frommodelo? Is it a typo just here, or in your code, too? Please edit your post to clarify and remedy this.cfromm, or are you trying to make a linear model likey = mx + c?