A capstone project using PNAD Continua microdata with a reproducible offline pipeline and comparisons across ElasticNet, Gradient Boosting, XGBoost, CatBoost and a hybrid Mincer + CatBoost approach. FastAPI serves the final model to a React interface.
- Python
- FastAPI
- React
- CatBoost
- XGBoost
- SHAP
- Docker
Context and problem #
Income depends on demographic, educational, occupational and geographic relationships. The project treats prediction as a scientific investigation, not merely metric optimization.
My contribution #
The repository contains data extraction and processing, feature engineering, comparative experiments, interpretability, methodological documentation, an inference API and a frontend.
Architecture #
The ML pipeline runs offline and exports the trained artifact. A decoupled FastAPI backend validates input and performs inference; the React frontend collects data and displays the estimate.
- ✓ Pipeline offline reprodutível
- ✓ API de inferência FastAPI
- ✓ React + Vite
- ✓ Docker Compose
Evaluation and quality #
The comparison uses the same 25,801-row test set. CatBoost V5 reached 0.5913 log-scale R²; the Mincer + CatBoost hybrid reached 0.4906 R² and R$910.17 RMSE on the original scale.
Limitations #
The project acknowledges cross-sectional data, unobserved variables and income heterogeneity. The estimate is experimental and must not drive decisions about individuals.
Next steps #
Consolidate reproducible dependencies, automate inference-flow tests and publish a demo with an explicit responsible-use notice.
Test the product and inspect the code
The live demo runs the core flow with safe local data. The public repository preserves the complete backend, tests, infrastructure and technical documentation.