How shawaiz-project/data-failure-risk-equation works
dfre scores data and AI degradation by computing normalized signals and combining them into a bounded risk result, then classifying that result into an action band. Users can run this through the Python API, a composable batch pipeline, the CLI, or optional integrations. Calibration, explanations, sensitivity analysis, monitoring, alert routing, trend detection, and HTML reporting extend the scoring workflow. The graph reflects README-documented capabilities where their implementation was not sampled; those subsystem links are omitted when call ownership is uncertain.
Main entry points: builder.py Pipeline builder · cli.py CLI · pandas_ext.py Pandas accessor · one_liner.py Python API
Components 33
User interfaces
- CLI
src/dfre/cli.py - Python API
src/dfre/api/one_liner.py - DFRE facade
src/dfre/api/facade.py - Pipeline builder
src/dfre/api/builder.py
Signal computation
- Batch signals
src/dfre/signals/base.py - Missingness
src/dfre/signals/missingness.py - Invalidity
src/dfre/signals/invalidity.py - Drift
src/dfre/signals/drift.py - Uncertainty
src/dfre/signals/uncertainty.py - Freshness
src/dfre/signals/freshness.py - Volume
src/dfre/signals/volume.py - Schema
src/dfre/signals/schema.py - Outliers
src/dfre/signals/outliers.py
Risk analysis
- Risk equation
src/dfre/core/equation.py - Explainability
src/dfre/core/explain.py - Sensitivity analysis
src/dfre/core/sensitivity.py
Policy and calibration
- Risk bands
src/dfre/policy/bands.py - Escalation
src/dfre/policy/escalation.py - Parameter calibration
src/dfre/calibration/parameters.py - Threshold calibration
src/dfre/calibration/thresholds.py
Monitoring
- Signal snapshots
src/dfre/monitoring/snapshot.py - History store
src/dfre/monitoring/history.py - Trend detection
src/dfre/monitoring/trends.py - Alert routing
src/dfre/monitoring/alerts.py
Reports and integrations
- HTML reports
src/dfre/report/html.py - FastAPI service
src/dfre/integrations/fastapi_ext.py - Pandas accessor
src/dfre/integrations/pandas_ext.py - Prometheus extension
src/dfre/integrations/prometheus_ext.py - Airflow extension
src/dfre/integrations/airflow_ext.py - Scikit-learn extension
src/dfre/integrations/sklearn_ext.py
Other components
- User / caller
- HTTP client
- Alert sink
Connections 43
- User / caller → Python API: calls
- User / caller → Pipeline builder: configures
- User / caller → CLI: invokes
- Pipeline builder → Missingness: computes
- Pipeline builder → Invalidity: computes
- Pipeline builder → Drift: computes
- Pipeline builder → Uncertainty: computes
- Pipeline builder → Freshness: computes
- Pipeline builder → Volume: computes
- Pipeline builder → Schema: computes
- Pipeline builder → Outliers: computes
- Pipeline builder → Risk equation: scores signals
- Python API → Risk equation: scores signals
- Python API → Risk bands: classifies risk
- DFRE facade → Python API: exposes
- CLI → DFRE facade: uses
- CLI → Parameter calibration: calibrates
- CLI → Threshold calibration: calibrates
- CLI → History store: reads history
- CLI → Trend detection: analyzes trends
- CLI → FastAPI service: creates service
- CLI → HTML reports: generates report
- Risk equation → Explainability: decomposes risk
- Risk equation → Sensitivity analysis: analyzes risk
- Escalation → Risk bands: classifies with
- Parameter calibration → Risk equation: scores history
- Threshold calibration → Risk bands: sets thresholds
- Signal snapshots → History store: appends snapshots
- History store → Trend detection: provides risks
- Signal snapshots → Alert routing: provides snapshot
- Alert routing → Alert sink: dispatches alerts
- HTTP client → FastAPI service: requests scoring
- FastAPI service → Python API: scores request
- Pandas accessor → Missingness: computes
- Pandas accessor → Invalidity: computes
- Pandas accessor → Drift: computes
- Pandas accessor → Uncertainty: computes
- Pandas accessor → Schema: computes
- Pandas accessor → Outliers: computes
- Pandas accessor → Python API: scores signals
- Prometheus extension → Alert sink: exports metrics
- Airflow extension → Pipeline builder: integrates pipeline
- Scikit-learn extension → Parameter calibration: supports calibration