How theshahnawazali/argus works
Argus is a financial-fraud ML project with a FastAPI interface around training, model evaluation, and SHAP explanations. The principal implemented workflow loads and joins transaction and identity data, splits it, builds a preprocessing-and-classifier pipeline, trains it, and saves a model artifact. Evaluation and explanation are separate API actions. The README also describes Optuna tuning and prediction APIs, but sampled runtime code does not show a tuning implementation or a /predict route; those capabilities are therefore not drawn as live request flows.
Main entry points: main.py FastAPI routes · explain.py SHAP explanations · xgb_pipeline.pkl XGBoost pipeline · data_loader.py Data loader
Components 15
API actions
- FastAPI routes
main.py - Explanation request
schemas/predict.py
Data preparation
- Paths and parameters
pipeline/config.py - Data loader
pipeline/data_loader.py - Train-test split
pipeline/train.py
Model lifecycle
- Missing-value handler
pipeline/transformers.py - Pipeline builders
pipeline/pipeline_builder.py - XGBoost pipeline
models/xgb_pipeline.pkl - GBM pipeline
models/gbm_pipeline.pkl - Hyperparameter tuning
notebooks/05_hyperparameter_tunning.ipynb
Evaluation and explanation
- Evaluation metrics
main.py - SHAP explanations
pipeline/explain.py - SHAP analysis
notebooks/09_shap_explainability.ipynb
Other components
- API caller
- IEEE-CIS files
data/raw
Connections 17
- API caller → FastAPI routes: calls routes
- FastAPI routes → Explanation request: validates request
- FastAPI routes → Data loader: loads data
- Data loader → IEEE-CIS files: reads and joins
- FastAPI routes → Paths and parameters: uses settings
- FastAPI routes → Train-test split: splits data
- FastAPI routes → Pipeline builders: builds pipeline
- Pipeline builders → Missing-value handler: uses transformer
- FastAPI routes → XGBoost pipeline: trains and saves
- FastAPI routes → GBM pipeline: trains and saves
- FastAPI routes → XGBoost pipeline: loads for evaluation
- FastAPI routes → Evaluation metrics: computes metrics
- FastAPI routes → SHAP explanations: requests explanation
- SHAP explanations → XGBoost pipeline: loads pipeline
- SHAP explanations → GBM pipeline: loads pipeline
- Hyperparameter tuning → XGBoost pipeline: documents tuning
- SHAP analysis → SHAP explanations: explores explanations