How bhupesh-debug/ml-project-client-cashflow-early-warning works
CP-PCG is an SMB finance advisory engine: it turns historical cash-flow, working-capital, and WIP data into leakage-safe features, forecasts 13-week cash flow, flags 45-day Daily Cash Target breach risk, and presents risk tiers with TAPW interventions. The Streamlit app is the interactive user entry point; inference produces the displayed diagnostics. The README documents the broader domain stages, while sampled source confirms key implementation links. Some unsampled subsystem details are represented only at the documented level.
Main entry points: train.py Chronological Model Training · pipeline.py Prediction Engine · app.py Interactive Diagnostics · build_features.py Leakage-Safe Features
Components 14
Financial Data
- SMB Data Generator
src/data/generate_synthetic_data.py - Schema and Time Split
src/data/loader.py - Historical Transactions
data/sample/raw_platform_cashflow_sample.csv
Feature Engineering
- Leakage-Safe Features
src/features/build_features.py
Modeling and Evaluation
- Chronological Model Training
src/models/train.py - Financial Baselines
src/models/baseline.py - Forecast and Risk Metrics
src/evaluation/metrics.py - Trained Model Artifacts
reports/models
Inference and Advisory
- Interactive Diagnostics
app/app.py - Prediction Engine
src/inference/pipeline.py - Liquidity Risk Tiering
src/inference/pipeline.py - TAPW Interventions
src/inference/pipeline.py - Platform Triad Review
Other components
- Finance Manager
Connections 17
- Finance Manager → Interactive Diagnostics: enters inputs
app/app.py - Interactive Diagnostics → Prediction Engine: requests predictions
app/app.py - SMB Data Generator → Historical Transactions: generates records
README.md - Historical Transactions → Schema and Time Split: loads and validates
src/data/loader.py - Schema and Time Split → Leakage-Safe Features: provides records
README.md - Leakage-Safe Features → Chronological Model Training: builds training inputs
README.md - Chronological Model Training → Financial Baselines: benchmarks against
src/models/train.py - Chronological Model Training → Forecast and Risk Metrics: evaluates predictions
src/models/train.py - Chronological Model Training → Trained Model Artifacts: serializes models
src/models/train.py - Chronological Model Training → Leakage-Safe Features: uses feature matrices
README.md - Prediction Engine → Trained Model Artifacts: loads trained models
src/inference/pipeline.py - Prediction Engine → Leakage-Safe Features: transforms inputs
src/inference/pipeline.py - Prediction Engine → Liquidity Risk Tiering: assigns risk tier
src/inference/pipeline.py - Prediction Engine → TAPW Interventions: prescribes actions
src/inference/pipeline.py - Interactive Diagnostics → Liquidity Risk Tiering: displays diagnostics
app/app.py - Interactive Diagnostics → TAPW Interventions: presents interventions
app/app.py - TAPW Interventions → Platform Triad Review: guides review
README.md