- Overview
- Goals
- Getting Started
- Run Demo
- Get Today's Data
- Create Today's Best Model
- Make A Prediction
This project contains a complete house price estimator for the city of Piraeus. It came to fruition in the context of a machine learning excercise and should be treated as such.
The goal of this project is to experiment with and compare different regression models and to create an API which makes an estimation of the value of a house located in Piraeus.
To run the estimator localy you have to follow these steps:
- Clone repo
$ git clone [email protected]:DimitrisPatiniotis/house_valuation.git
- Create a virtual environment and install all requirements listed in requirements.txt
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
To execute default demo run:
$ python3 demo.py default
To execute demo with logarithmic scaling run:
$ python3 demo.py scaling log
To execute demo with standard scaling run:
$ python3 demo.py scaling standard
To execute k-NN experiment (examining the relationship between the number of neighbors and model performance) run:
$ python3 demo.py test knn
To execute Bayesian Ridge Regression experiment (examining the relationship between the number of iterations and model performance) run:
$ python3 demo.py test brr
To execute Support Vector Regression experiment (examining the relationship between C parameter and model performance) run:
$ python3 demo.py test svr
Finally, to execute Random Forest Regression experiment (examining the relationship between the number of estimators and model performance) run:
$ python3 demo.py test rfr
To get today's data run:
$ python3 Processes/scraper.py
To create an up-to-date inference model (a Random Forest Regressor) run:
$ cd Processes/
$ python3 createBestForrest.py
Note that the model created has a minimum R-Squared of 0.7.
Before you make a prediction, make sure you created have have up to date data and an up to date model (see the two steps mentioned above). Also make sure you are in the project's root directory.
To make a new prediction run:
$ python3 makeprediction.py <property_type> <specific_location> <square_meters> <level> <number_of_bedrooms> <number_of_bathrooms> <construction_year>
Property type and specific location values are not case sensitive and do not need stress-marks. An example is given bellow:
$ python3 makeprediction.py Διαμέρισμα Πασαλιμανι 90 2 2 1 1971