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.txtUse mlflow to train the model
mlflow run . -e mainThe serialized model, scalers and encoders will be written to the model subdirectory.
Unit tests can be run using
mlflow run . -e testThere is a simple REST API available to make model predictions. Start the api with
uvicorn main:appNow 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