Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

immo-app

This application runs an API with a model trained to predict prices from real estate ads.

APP

install and run

Before running the app, install requirements:

pip install -r requirements.txt

Standalone

Once the needed libraries are installed, run the app as a standalone api :

uvicorn app:app --host 0.0.0.0

your app will be available on http://localhost:8000

Docker

You can also run the app inside a container using docker :

build image :

docker build -t immoapp:latest .

and run container :

docker run --network host --name immo_app immoapp:latest

endpoints

/predict : takes multiple args to create the feature vector to be sent to the model :

{ 
    "PostalCode" : int,
	 "TypeOfProperty" : int,
	 "TypeOfSale" : int,
	 "Kitchen" : Optional[str],
	 "StateOfBuilding" : Optional[str],
	 "Bedrooms" : Optional[float],
	 "SurfaceOfGood" : Optional[float],
	 "NumberOfFacades" : Optional[float],
	 "LivingArea" : float,
	 "GardenArea" : Optional[float]
}

training and evaluation

the model behind the app is a GradientBoostingRegressor. The original dataset is to be found in resources/workshop_dataset.json. The dataset has been splitted in 80% training, 20% for testing.

Both training and testing sets can be found in :

those files are serialized dataframes to be loaded with pickle.load().

The model and preprocessor (encoder) has been trained on the train set and evaluated on the unseen test set with a r2 score of 0.78

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages