Skip to content

just4jc/boston-housing-price-prediction

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boston Housing Price Prediction

The Boston Housing Dataset consists of price of houses in various places in Boston. Alongside with price, the dataset also provide information such as Crime (CRIM), areas of non-retail business in the town (INDUS), the age of people who own the house (AGE), and there are many other attributes that available here https://archive.ics.uci.edu/ml/machine-learning-databases/housing/housing.names.

You can use the Boston dataset that I have provided in the repository or you can load it from sklearn's library itself.

Overview of what we have to do

  • Loading the dataset
  • Evaluating the model using k-fold cross-validation
  • Training the model on the dataset
  • Saving the model to use it whenever required without the need to retrain it

Check your Libraries

You should have your libraries updated. You will need the following libraries:

  • numpy
  • keras
  • pandas
  • json
  • sklearn
  • flask

Steps to get it up and running

  1. The trainer.py loads the dataset available within the repository and first cross-validates it using 10-fold method and then fits the dataset onto the model. The trained model is then jsoned so as to make it easier to load at the time of prediction.

  2. The api.py makes the server and runs as the backend program. This takes in the values from the form and uses them for prediction. To run the api.py head to the command prompt, change the directory and type python api.py.

  3. Finally, open the web-browser and go to http://localhost:8001/ to get your index.html running.

What you should see

  • bostonIndex.html

bostonIndex.html

  • predictPage.html

predictPage.html

Brief of what's happening

  • The index.html takes in values which are sent to the api.py running in the background which does all the prediction.
  • api.py loads the saved model and sends back the prediction in the Jinja variable.

About

Predict house prices using Neural Networks (keras)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 62.6%
  • Python 37.4%