How riluck/supply-chain-management-machine-learning works
Project type and purpose
• This is a data-science / machine-learning pipeline organized as Jupyter notebooks, aimed at predicting delays in global supply-chain deliveries of essential HIV medicines.
• The workflow reads raw transaction and external index data, cleans and engineers features, explores and selects features, then runs a two-stage “classification then regression” model (delay vs. no-delay, followed by delay-length estimation).
File structure
• Top-level artifacts:
• Four sequential notebooks (1–4) implementing data cleaning/feature engineering, EDA/feature selection, model pipeline/benchmarking/refinement, and final modeling/results.
• A helper module (my_helper_functions.py) containing reusable data-processing and modeling routines.
• A Data directory subdivided into:
– Source (raw SCMS CSV/Excel, LPI, FSI, country/continent mappings, Google Maps API results)
– Features (intermediate engineered feature CSVs)
– Results (benchmark and final prediction outputs)
• A README.md and a project report PDF.
README for insights
• Inputs: Procurement transaction SCMS data, World Bank LPI, Fund for Peace FSI, Google Maps geocoding.
• Solution: Classification (RandomForest, XGBoost, SVM, etc.) → Regression pipeline.
• Outputs: Performance metrics (Recall, F1, R², RMSE) and result CSVs.
• Environment: Python 3.6.1, Jupyter notebooks, common libraries (pandas, numpy, sklearn, imblearn, yellowbrick, seaborn, matplotlib, googlemaps).
a. Main components
• External Data Sources
– SCMS transaction CSV/Excel files (PEPFAR)
– World Bank LPI data
– Fund for Peace FSI data
– Google Maps Geocoding API
• Data Ingestion & Raw Storage
– Scripts/notebooks that load and standardize these sources into Data/Source
• Data Cleaning & Feature Engineering
– Notebook #1 and helper functions produce Data/Features/*.csv
• Exploratory Data Analysis & Feature Selection
– Notebook #2 uses pandas_profiling, missingno, pivot tables to prune and select features
• Modeling Pipeline
– Notebook #3 orchestrates:
1. Classification model training & benchmark
2. Regression model training on “delayed” subset
– Uses scikit-learn, imblearn, XGBoost, SVM, RandomForest
• Final Model & Results
– Notebook #4 generates final predictions, writes to Data/Results, and creates charts
• Outputs & Reporting
– classifier_benchmark_predicted.csv, classifier_final_predicted.csv, charts, and the capstone report PDF
b. Relationships & data flows
– Flow from Raw Storage → Cleaning/Feature Engine → Features storage
– Flow from Features → EDA/Selection → selected feature set → Modeling Pipeline
– Flow from Modeling → Results storage → Reporting
c. Architectural patterns & principles
– Pipeline pattern: clearly separated ETL (Extract, Transform, Load), analysis, modeling, and reporting stages
– Modularization: reusable helper functions extracted into a separate module
– Two-stage modeling: classification gating followed by regression for prioritized resource allocation
d. Technologies, frameworks & libraries
– Python 3.6.1, Jupyter notebooks
– Data manipulation: pandas, numpy
– Visualization: seaborn, matplotlib, missingno, yellowbrick, pivottablejs
– Modeling: scikit-learn, imblearn, XGBoost, SVM
– External API: googlemaps
– Version control: Git (.gitignore present)
Detail but avoid over-fragmentation
• Intermediate storage folders (Source, Features, Results) as persistent nodes.
• Notebook or major script as its own component to illustrate sequence.
• Call out the two-stage classification→regression workflow clearly.
• External inputs (World Bank LPI, FSI, Google Maps API) are individually represented.