Simple Linear Regression on Python with scikit-learn
import matplotlib.pyplot as plt
import numpy as np
my dataframe is df
#plot for see if there is a linear relation
plt.scatter(col1, col2)
plt.show()
#create training and test data set
rand = np.random.rand(len(df)) < 0.8
train = cdf[rand]
test = cd...
massyfigini.hashnode.dev1 min read