Samuel-Ricardo / ML_Regression-Model_Boston-Housing

Artificial Intelligence Regression Model for Pricing Housing in Boston

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linear Regression Model | Boston-Housing

1_FHQOSHMMT07CbXpklk1Ehw


πŸš€ πŸŸ₯ Linear Regression Model | Boston-Housing πŸŸ₯ πŸš€

Artificial Intelligence Regression Model for Pricing Housing in Boston

|   Overview   |    Technologies   |    Project   |   Run   |   Author   |   



| πŸ›°οΈ About:

I took on the classic challenge of calculating the price of a house in Boston, so I built a Linear Regression model that considers data from the region to evaluate this house. I used Google Colab for this.


πŸ—οΈ | Technologies and Concepts Studied:

  • Python
  • Google Colab
  • Tensorflow
  • Keras
  • Numpy
  • pandas
  • tensorflow-addons
  • keras-utils
  • Matplotlib
  • Linear regression
  • Graphics

Among Others...


🧠 | Project:


To calculate, I took these data from Keras as a basis:


Boston house price data from Harrison, D. and Rubinfeld, D.L. for the article 'Hedonic Prices and the Demand for Clean Air', J. Environ. Economics and Management, vol.5, 81-102, 1978.


  • Per capita crime rate by city.
  • Proportion to residential land zoned in lots over 25,000 square feet.
  • Proportion in relation to hectares of non-retail land by city
    • What is the relationship between residential land and commercial land
  • Proportion in relation to land allocated with rivers
  • Concentration of nitric oxides measured on the ground (parts per 10 million)
    • Amount of waste
  • Average number of rooms per dwelling in the same subdivision
    • Quite common to have more rooms left to rent to guests
    • These extra rooms are usually planned / estimated during construction
  • Proportion of occupied units (subdivisions) and built before 1940
    • Get a sense of how much that area evolved at a specific time
  • Weighted distances to five Boston employment centers
    • Distance from subdivision to centers
  • Accessibility index to radial highways
  • Average value property tax rate (scaled by 10,000)
  • Ratio of students per teacher by city
  • Proportion of black people by city (per thousand inhabitants)
  • Lowest status percentage of the population
  • Average home value (scaled by 1,000)

The goal is to use linear regression to find the best value of owner-occupied homes at 1,000 USD.

I created a sequential model with 3 Dense Layers, where the last one is the calculation of the result output, in total we have more than 120 neurons fully connected with more than 5000 parameters, 20 KB in total.

image

image

I also configured an Optimizer algorithm for better results and corrections in each processing cycle.

image

βœ… | Results:

I programmed 100 processing epochs (cycles) and the model exceeded more than 90% accuracy with an average absolute error of 1.9%

image


In a graphical view by processing epochs:

image

image

πŸ‘¨β€πŸ’» | How to use


Import the Boston_Housing_Regressor.ipynb file in a Python Notebook App like Jupyter or Google Colab and run cell by cell.

  • Run only the cell with !pip install commands in [Setup and Install Deps] section.
  • Now, jump to [Linear Regression | Boston Housing] Section and run cells in order.


:octocat: | Author:


- Samuel Ricardo

About

Artificial Intelligence Regression Model for Pricing Housing in Boston

License:MIT License


Languages

Language:Jupyter Notebook 95.9%Language:Python 4.1%