subhadipml / California-Housing-Price-Prediction

Build a model of housing prices to predict median house values in California using the provided dataset. Train the model to learn from the data to predict the median housing price in any district, given all the other metrics. Predict housing prices based on median_income and plot the regression chart for it.

Home Page:https://github.com/Simplilearn-Edu/Machine-Learning--Projects/tree/master/Projects/Projects%20for%20Submission/Project%204%20-%20California%20Housing%20Price%20Prediction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

California-Housing-Price-Prediction

Step1: Import all libraries

Step2: Load the data

Step2.1: Read the “housing.csv” file from the folder into the program

Step2.2: Print first few rows of this data

Step2.3: Extract input (X) and output (y) data from the dataset

Step3: Handle missing values: Fill the missing values with the mean of the respective column

Step4: Encode categorical data: Convert categorical column in the dataset to numerical data

Step5: Split the dataset: Split the data into 80% training dataset and 20% test dataset

Step6: Standardize data: Standardize training and test datasets

Task1: Perform Linear Regression

Task1.1: Perform Linear Regression on training data

Task1.2: Predict output for test dataset using the fitted model

Task1.3: Print root mean squared error (RMSE) from Linear Regression

Task2: Perform Decision Tree Regression

Task2.1: Perform Decision Tree Regression on training data

Task2.2: Predict output for test dataset using the fitted model

Task2.3: Print root mean squared error from Decision Tree Regression

Task3: Perform Random Forest Regression

Task3.1: Perform Random Forest Regression on training data

Task3.2: Predict output for test dataset using the fitted model

Task3.3: Print root mean squared error from Random Forest Regression

Task4: Bonus exercise: Perform Linear Regression with one independent variable

Task4.1: Extract just the median_income column from the independent variables (from X_train and X_test)

Task4.2: Perform Linear Regression to predict housing values based on median_income

Task4.3: Predict output for test dataset using the fitted model

Task4.4: Plot the fitted model for training data as well as for test data to check if the fitted model satisfies the test data

Task4.4.1: let us visualize the Training set

Task4.4.2: let us visualize the Testing set

About

Build a model of housing prices to predict median house values in California using the provided dataset. Train the model to learn from the data to predict the median housing price in any district, given all the other metrics. Predict housing prices based on median_income and plot the regression chart for it.

https://github.com/Simplilearn-Edu/Machine-Learning--Projects/tree/master/Projects/Projects%20for%20Submission/Project%204%20-%20California%20Housing%20Price%20Prediction


Languages

Language:Python 100.0%