Implementation of Insurance fraud detection.
Data set has been taken from 2018 UMN STAT 8051 Modeling Kaggle competition. Train and test sets can be found at ./data/train.csv
and ./data/test.csv
To run the application locally, you require Python>3.8 and pip
Use pip to install the packages with below command:
pip install -r requirements.txt
This application requires the following packages to start a development server:
Run the below command to start the application:
uvicorn api:app
Note: Use --reload
to reload the server on code changes
Currently there are two APIs that can train and infer the model. Below are the two API description:
-
/train
train is a HTTP Post call that takes params such as depth, features and number of estimators to name a few. Pickle has been used to save the best model at
./models/store_best_model.pickle
. -
/test
Uses the saved model and finds out if the claim is a fraud or not.
More info and API documentation can be found at:
http://localhost:8000/docs
.
After training, the best model will be saved in models
. The report.json
file containing the results will be saved in the output folder after testing using test data.