Learn practical skills, build real-world projects, and advance your career
import pandas as pd
import matplotlib.pyplot as plt
from sklearn import linear_model
import numpy as np
df= pd.read_csv('slr_data.csv')
df
import seaborn as sns
sns.regplot(data=df,x='x',y='y',color='g',scatter=True,marker='+',x_estimator=np.mean);
Notebook Image
lm=linear_model.LinearRegression()