You are viewing a single comment's thread. Return to all comments →
import numpy as np from sklearn.linear_model import LinearRegression inp = [15,12,8,8,7,7,7,6,5,3] out = [10,25,17,11,13,17,20,13,9,15] x = np.array(inp).reshape(-1,1) y = np.array(out).reshape(-1,1) reg = LinearRegression() result = reg.fit(x,y)`` pred = result.predict(np.array(10).reshape(-1,1)) print(round(pred[0][0],1))
Seems like cookies are disabled on this browser, please enable them to open this website
Correlation and Regression Lines - A quick recap #3
You are viewing a single comment's thread. Return to all comments →