Journey with Linear Regression

Arpita Ghosh
3 min readOct 21, 2020

Whenever I am trying my blog , always going back to my initial days with data science. If someone is really new to data science and struggling to learn each and every step of coding. It will be helpful for them to have one handy document which will have some guidance. Yes, this is the only inspiration for me to write. Also I believe in knowledge sharing , then only knowledge can be grown up.

To start with this blog , you can refer some key points about Linear Regression.

https://medium.com/@arpita.mukh1/quick-reference-points-about-linear-regression-5b6659e1bce3

In this blog, I am capturing step by step coding in Python.

Importing Packages

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
from sklearn.model_selection import train_test_split
import statsmodels.api as sm
from sklearn.feature_selection import RFE
from sklearn.linear_model import LinearRegression
from statsmodels.stats.outliers_influence import variance_inflation_factor

Data Loading, Processing and Visualization

#loading data
df=pd.read_csv(‘kc_house_data.csv’)

#Get the information about data
df.info()

#Find out the…

--

--

No responses yet