The guide for AutoXGB which includes training and running web server.
AutoXGB is simple but effective AutoML tool to train model tabular dataset directly. The AutoXGB use XGBoost for training the model, Optuna for hyperparameters optimization and FastAPI to run web app.
- auto train xgboost directly from CSV files
- auto tune xgboost using Optuna
- auto serve best xgboot model using FastAPI
pip install autoxgb
The dataset is available at Kaggle: Adult Census Income under CC0: Public Domain. It was extracted from the 1994 Census bureau database by Ronny Kohavi and Barry Becker (Data Mining and Visualization, Silicon Graphics).The prediction task is to determine whether a person makes over $50K a year.
Train the model in terminal using the autoxgb train
command. The parameters are same as above.
autoxgb train \
--train_filename binary_classification.csv \
--output output \
By using autoxgb serve
on CLI you can run localy FastAPI server.
We are going to use FastAPI GUI to run predictions on model by adding /docs
at the end of the link. For example 172.3.167.43:39118/docs
- workclass: "Private"
- education: "HS-grad"
- marital.status: "Widowed"
- occupation: "Transport-moving"
- relationship: "Unmarried"
- race: "White"
- sex: "Male"
- native.country: "United-States"
- age: 20
- fnlwgt: 313986
- education.num: 9
- capital.gain: 0
- capital.loss: 0
- hours.per.week: 40
The result is <50k
with confidence of 97.6% and >50k
with confidence of 2.3%.