This project trains a simple income estimation model from US census data. For model details please see the model scorecard
Install dependencies using pip or creating a conda environment
# Create a new conda workspace
conda create --name income-estimation
# Activate the workspace
conda activate income-estimation
# Install requirements
conda install --file requirements.txt
Use mlflow to train the model
mlflow run . -e main
The serialized model, scalers and encoders will be written to the model subdirectory.
Unit tests can be run using
mlflow run . -e test
There is a simple REST API available to make model predictions. Start the api with
uvicorn main:app
Now you can use the predict route to make predictions (see http://localhost:8000/docs for details). There is also an example python script available in api_predict.py