Linear Regression machine learning: part01
Welcome everyone, Today we will going to start New part of our course(Machine Learning). In this section we see first Regression algorithms.
This Regression Algorithm divided into three parts:
PART_01 Check out data and see all plots
PART_02 Training and Testing a Linear Regression Model
PART_03 Exercise and Solution
At the end of every post link are provided of the every part.
What is Regression?
Linear Regression in python search for relationship variables.you can observe several employees of the company and try to understand how their salaries depends on the feature.This is a regression problems where data related to each employee represent one observation. The presumption is that the experience, education, roles, and city are the independent feature, while the salary depend on them.
what is Linear Regression Machine Learning?Linear regressions is probably one of the most important and widely used regressions techniques. It is among the simplest regression method. One of its main advantages is the ease of interpreting result.
LET’S START WITH PROJECT WORK:
Your neighbor is a real estate agents and want some help predicting housing prices for regions in the USA. It would be great if you could somehow create a model for her that allow her to put in a few features of a house and returns back an estimate of what the houses would sell for.
He has asked you if you could help her out with your new data science skills. You say yes, and decide that Linear Regressions might be a good path to solve this problem!
Your neighbor then give you some information about a bunch of houses in region of the United States,it is all in the data set: USA_Housing.csv.
The data contains the following column:
- ‘Avg. Area Incomes’
- ‘Avg. Area House Ages’
- ‘Avg. Area Number of Room’
- ‘Avg. Area Number of Bedroom’
- ‘Area Populations’
Check out the data
We have been able to get some data from your neighbor for housing prices as a csv set, let’s get our environment ready with the libraries we will need and then import the data.
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
|Avg. Area Incomes||Avg. Area House Ages||Avg. Area Number of Room||Avg. Area Number of Bedroom||Area Populations||Prices|
Let's create some simple plot to check out the data.