Skip to content

rahuljadli/Housing-Price-Prediction-Using-Advanced-Regression-Technique-s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Housing-Price-Prediction

Imported all the required library

import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
from sklearn import cross_validation
from sklearn.linear_model import LinearRegression
from sklearn.ensemble import RandomForestRegressor
from sklearn.model_selection import train_test_split
from sklearn.ensemble import GradientBoostingRegressor

Loading and Viewing the data

data=pd.read_csv('train.csv')
data.head()

Data Visualisation

Ploting the Heatmap

alt Survived

Ploting Histogram of Saleprice

alt histogram

Ploting effect of 2nd floor on house price

alt 2nd floor

Ploting effect of Lot Area on Sale Price

alt lot area

Ploting Basement area on house price

alt basement area

Ploting effect of MasVnr Area on Sale Price

alt Masvnr Area

Ploting effect of Garage Year on Sale Price

alt Garage year

Ploting effect of Year Renowed on Sale Price

alt Garage year

Ploting effect of 1st floor on Sale Price

alt 1st floor

Ploting effect of Year Build on Sale Price

alt  Year Build

Ploting effect of Basement area on Sale Price

alt Basement area

Ploting effect of Grive area on Sale Price

alt Grive area

Ploting effect of Garage area on Sale Price

alt Garage area

Ploting effect of Cars on Sale Price

alt Cars

Ploting effect of Total rooms on Sale Price

alt Total rooms

Ploting effect of Overall quality on Sale Price

alt Overall quality

Ploting effect of Fireplaces on Sale Price

alt Cars

Converting Categorical data into Continous using Label Encoder

df.GarageCond=le.fit_transform(df.GarageCond)
df.GarageYrBlt=le.fit_transform(df.GarageYrBlt)
df.GarageFinish=le.fit_transform(df.GarageFinish)

Using Different Model's

Creating Training and Testing Data set

x_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=0.20, random_state=42)

Training the model

model=LogisticRegression()
model.fit(x_train,y_train)

Making the prediction

new_prediction=model.predict(testing_data)

Getting the accuracy score

from sklearn.metrics import mean_squared_error
rmse = np.sqrt(mean_squared_error(prediction, y_test))
rmse

Got RMSE value of 69140.009

Here only shown one algorithm in the notebook all other algorithm are used there.

About

Used Linear Regression to find the price of the house

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published