DESCRIPTION

Background of Problem Statement :

The US Census Bureau has published California Census Data which has 10 types of metrics such as the population, median income, median housing price, and so on for each block group in California. The dataset also serves as an input for project scoping and tries to specify the functional and nonfunctional requirements for it.

Problem Objective :

The project aims at building a model of housing prices to predict median house values in California using the provided dataset. This model should learn from the data and be able to predict the median housing price in any district, given all the other metrics.

Districts or block groups are the smallest geographical units for which the US Census Bureau

publishes sample data (a block group typically has a population of 600 to 3,000 people). There are 20,640 districts in the project dataset.

Domain: Finance and Housing

Analysis Tasks to be performed:

1. Build a model of housing prices to predict median house values in California using the provided dataset.

2. Train the model to learn from the data to predict the median housing price in any district, given all the other metrics.

3. Predict housing prices based on median_income and plot the regression chart for it.

1.Load the data:

- Read the “housing.csv” file from the folder into the program.
- Print first few rows of this data.
- Extract input (X) and output (Y) data from the dataset.

2.Handle missing values:

- Fill the missing values with the mean of the respective column.

3.Encode categorical data:

- Convert categorical column in the dataset to numerical data.

4.Split the dataset:

- Split the data into 80% training dataset and 20% test dataset.

5.Standardize data:

- Standardize training and test datasets.

6.Perform Linear Regression:

- Perform Linear Regression on training data.
- Predict output for test dataset using the fitted model.
- Print root mean squared error (RMSE) from Linear Regression.

[ HINT: Importmean_squared_errorfromsklearn.metrics]

7.Bonus exercise: Perform Linear Regression with one independent variable:

- Extract just the median_income column from the independent variables (fromX_trainandX_test).
- Perform Linear Regression to predict housing values based onmedian_income.
- Predict output for test dataset using the fitted model.
- Plot the fitted model for training data as well as for test data to check if the fitted model satisfies the test data.

Dataset Description :

Field | Description |

longitude | (signed numeric - float) : Longitude value for the block in California, USA |

latitude | (numeric - float ) : Latitude value for the block in California, USA |

housing_median_age | (numeric - int ) : Median age of the house in the block |

total_rooms | (numeric - int ) : Count of the total number of rooms (excluding bedrooms) in all houses in the block |

total_bedrooms | (numeric - float ) : Count of the total number of bedrooms in all houses in the block |

population | (numeric - int ) : Count of the total number of population in the block |

households | (numeric - int ) : Count of the total number of households in the block |

median_income | (numeric - float ) : Median of the total household income of all the houses in the block |

ocean_proximity | (numeric - categorical ) : Type of the landscape of the block[ Unique Values : 'NEAR BAY', ' |

median_house_value | (numeric - int ) : Median of the household prices of all the houses in the block |

Dataset Size : 20640 rows x 10 columns

Answered 3 days AfterMar 07, 2022

SOLUTION.PDF## Answer To This Question Is Available To Download

- 2CAP 6635 Artificial IntelligenceHomework 3 Question 1 [1 pt] Figure 1 shows the current layout of a tic-tac-toe game board, and Max (“X”) is going to make the next move. Please draw the...SolvedMar 16, 2022
- class Calculator():def __init__(self):XXXXXXXXXXself.operation_map = {'add' : self.add}def get_input(self):XXXXXXXXXXpassdef execute_operation(self, operation):XXXXXXXXXXpass...SolvedMar 15, 2022
- Assignment: Using your flowchart and pseudocode developed last week for the larval bloater model in the Rice et al 1993 paper, create python code to simulate the results observed in the paper, except...SolvedMar 14, 2022
- Using Python, perform data analysis on the attached csv file regarding alzheimers. Then Study and analyze the dataset to find correlations between the average age of patients, average race of...SolvedMar 14, 2022
- IT 140 Design Document TemplateIT 140 Design Kyiesha Butler Storyboard (Description and Map)You are a wizard that’s been invited to a wizard’s symposium. Every wizard and sorcerer in the...SolvedMar 14, 2022
- Pizza Servings Calculator GUI AssignmentWrite a GUI to calculate the number of servings that a circular pizza of a certain diameter will make. The GUI will have the following appearance:It must...SolvedMar 13, 2022
- Load the JSON file below into Jupyter notebook Python as a dictionary; convert to a list and calculate the minimum velocity and maximum height using recursion. Introduce the space mission to the user...SolvedMar 09, 2022
- In checking writing systems, it's crucial to prevent the alteration of check amounts. One common security method requires that the amount be written in numbers and spelled out in words as well. Create...SolvedMar 06, 2022
- creating a Python program that builds on the assignments for weeks 3 and 4. In addition to the house cleaning service from the previous assignments, the company will now offer yard service. Yard...SolvedMar 06, 2022
- COMP 2152 – Assignment 1 – Winter 2022 Important: ● This is an individual assignment (complete the requirements on your own). ● Do not share the assignment requirements with any former or...SolvedMar 05, 2022

Copy and Paste Your Assignment Here

Disclaimer: The reference papers provided by TAE serve as model papers for students and are not to be submitted as it is. These papers are intended to be used for research and reference purposes only.

Copyright © 2022. All rights reserved.