Simple Linear Regression by Scikit
Suppose we have training set for y = 5 + 0.5 * x. Run below code we can find the coefficient(slope) and intercept import matplotlib.pyplot as plt import numpy as np from sklearn import datasets, linear_model # y = 5 + 0.5 * x x = [-10.0, -9.5, -9.0, -8.5, -8.0, -7.5, -7.0, -6.5, -6.0, -5.5,… Read More »