How 93chidiebere/timecost-gradient-machine works
tcgm is a Python framework for financial cost-sensitive classification and regression, plus recursive time-series forecasting. Users fit a classifier or regressor, then predict or evaluate financial costs; forecasters create lag/rolling/calendar features and use a regressor for recursive predictions. The graph includes the public API, objective and metric layers, and separate time-series and utility capabilities. Some model internals are only partially excerpted, so unverified helper relationships are omitted.
Main entry points: models.py Asymmetric regressor · __init__.py Public API · metrics.py Financial metrics · loss.py Losses and derivatives
Components 11
Modeling
- Cost-sensitive classifier
tcgm/models.py - Asymmetric regressor
tcgm/models.py - Boosting backends
Objectives and evaluation
- Losses and derivatives
tcgm/loss.py - Financial metrics
tcgm/metrics.py
Forecasting and preparation
- Recursive forecaster
tcgm/ts.py - Target encoder
tcgm/encoders.py - Walk-forward splits
tcgm/utils.py - Training and drift helpers
tcgm/core.py
Public interface
- Public API
tcgm/__init__.py
Other components
- Model user
Connections 16
- Model user → Cost-sensitive classifier: fits and predicts
README.md - Model user → Asymmetric regressor: fits and predicts
README.md - Model user → Recursive forecaster: fits and forecasts
README.md - Public API → Cost-sensitive classifier: exports
tcgm/__init__.py - Public API → Asymmetric regressor: exports
tcgm/__init__.py - Public API → Recursive forecaster: exports
tcgm/__init__.py - Public API → Losses and derivatives: exports
tcgm/__init__.py - Public API → Financial metrics: exports
tcgm/__init__.py - Cost-sensitive classifier → Losses and derivatives: uses objectives
tcgm/models.py - Asymmetric regressor → Losses and derivatives: uses objectives
tcgm/models.py - Cost-sensitive classifier → Financial metrics: uses metrics
tcgm/models.py - Asymmetric regressor → Financial metrics: uses metrics
tcgm/models.py - Cost-sensitive classifier → Boosting backends: trains with
tcgm/models.py - Asymmetric regressor → Boosting backends: trains with
tcgm/models.py - Financial metrics → Losses and derivatives: evaluates losses
tcgm/metrics.py - Recursive forecaster → Asymmetric regressor: fits and predicts
tcgm/ts.py