linear regression

PHOTO EMBED

Tue Jan 18 2022 10:24:43 GMT+0000 (Coordinated Universal Time)

Saved by @CaoimhedeFrein #python

xdata = (np.array(ret_rates.time_since_acqm)).reshape(-1,1)
#xdata.reshape(-1,1)
plt.plot(xdata, ret_rates.value_retention)
model = LinearRegression().fit(xdata, ret_rates.value_retention)
y_pred = model.predict(xdata)
plt.plot(xdata, y_pred)

##be sure to reshape the x value so you can get the ypred against it
content_copyCOPY