ergodic 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ergodic-0.2.0 → ergodic-0.3.0}/CHANGELOG.md +238 -3
- {ergodic-0.2.0 → ergodic-0.3.0}/CONTRIBUTING.md +1 -2
- {ergodic-0.2.0 → ergodic-0.3.0}/PKG-INFO +2 -2
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/adjustment-sets.md +1 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/assumptions.md +4 -1
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/backtest-a-forecast.md +9 -2
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/choose-a-method.md +8 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/compatibility.md +8 -4
- ergodic-0.3.0/docsite/pages/decode-a-graph.md +355 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/discover-a-graph.md +4 -1
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/domain-knowledge.md +63 -3
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/edge-probabilities.md +3 -1
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/estimate-average-effect.md +1 -0
- ergodic-0.3.0/docsite/pages/evaluate-a-graph.md +527 -0
- ergodic-0.3.0/docsite/pages/forecast-with-welt.md +270 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/install.md +3 -3
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/reconcile-a-hierarchy.md +1 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/start.md +1 -1
- ergodic-0.3.0/docsite/pages/test-a-graph.md +212 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/welt.md +35 -15
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/site.toml +4 -1
- {ergodic-0.2.0 → ergodic-0.3.0}/pyproject.toml +7 -4
- {ergodic-0.2.0 → ergodic-0.3.0}/scripts/docsite/__main__.py +7 -1
- {ergodic-0.2.0 → ergodic-0.3.0}/scripts/docsite/examples.py +24 -1
- {ergodic-0.2.0 → ergodic-0.3.0}/scripts/docsite/links.py +10 -1
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/__init__.py +22 -3
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/__init__.py +37 -2
- ergodic-0.3.0/src/ergodic/discovery/_average.py +453 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/_bootstrap.py +4 -1
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/_decode.py +569 -83
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/_discover.py +5 -4
- ergodic-0.3.0/src/ergodic/discovery/_evaluate.py +768 -0
- ergodic-0.3.0/src/ergodic/discovery/_exact.py +530 -0
- ergodic-0.3.0/src/ergodic/discovery/_graphtest.py +690 -0
- ergodic-0.3.0/src/ergodic/discovery/_mcmc.py +470 -0
- ergodic-0.3.0/src/ergodic/discovery/_posterior.py +905 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/_registry.py +1 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/_score.py +5 -1
- ergodic-0.3.0/src/ergodic/discovery/_target.py +297 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/_astar.py +2 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/_boss.py +2 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/_fci.py +5 -1
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/_ges.py +2 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/_glasso.py +16 -4
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/_grasp.py +2 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/_hc.py +2 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/_lingam.py +2 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/_mmpc.py +13 -9
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/_pc.py +2 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/_pcmci.py +2 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/_rfci.py +4 -1
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/_skeleton.py +7 -5
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/scores/__init__.py +2 -1
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/scores/_bdeu.py +1 -0
- ergodic-0.3.0/src/ergodic/discovery/scores/_bge.py +189 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/__init__.py +10 -2
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/_backtest.py +81 -4
- ergodic-0.3.0/src/ergodic/forecast/_protocol.py +60 -0
- ergodic-0.3.0/src/ergodic/forecast/_quantiles.py +133 -0
- ergodic-0.3.0/src/ergodic/knowledge.py +1050 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/_map.py +24 -3
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/welt/__init__.py +13 -2
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/welt/_discovery.py +30 -21
- ergodic-0.3.0/src/ergodic/welt/_forecast.py +1059 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/welt/_learner.py +45 -15
- ergodic-0.3.0/tests/test_average_effect.py +199 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_decode.py +18 -5
- ergodic-0.3.0/tests/test_decode_knowledge.py +702 -0
- ergodic-0.3.0/tests/test_discovery_graphtest.py +542 -0
- ergodic-0.3.0/tests/test_docs_welt_forecast_page.py +119 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_docs_welt_page.py +37 -5
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_docsite.py +15 -1
- ergodic-0.3.0/tests/test_evaluate_graph.py +345 -0
- ergodic-0.3.0/tests/test_forecast_quantiles.py +211 -0
- ergodic-0.3.0/tests/test_graph_posterior.py +373 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_knowledge.py +7 -7
- ergodic-0.3.0/tests/test_knowledge_soft.py +443 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_process_map.py +11 -0
- ergodic-0.3.0/tests/test_score_posterior.py +217 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_welt.py +162 -11
- ergodic-0.3.0/tests/test_welt_forecast.py +926 -0
- ergodic-0.2.0/docsite/pages/decode-a-graph.md +0 -179
- ergodic-0.2.0/src/ergodic/forecast/_protocol.py +0 -31
- ergodic-0.2.0/src/ergodic/knowledge.py +0 -453
- {ergodic-0.2.0 → ergodic-0.3.0}/.gitignore +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/LICENSE +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/NOTICE +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/README.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/SECURITY.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/case-studies/01-birthweight.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/case-studies/02-berkeley.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/case-studies/03-pension401k.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/case-studies/04-synthetic-control.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/case-studies/05-discovery.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/case-studies/06-clv.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/case-studies/07-churn.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/01-why-causality.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/02-good-and-bad-controls.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/03-estimating-effects.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/04-heterogeneous-effects.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/05-hidden-confounding.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/06-discovering-structure.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/07-quasi-experiments.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/08-process-mining.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/09-process-intelligence.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/10-decision-points.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/11-forecasting.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/12-structural-causal-models.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/13-hidden-regimes.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docs/learn/14-causal-forests-and-policy-trees.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/assets/docs.css +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/assets/docs.js +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/assets/ergodic-mark-dark.svg +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/assets/ergodic-mark-light.svg +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/assets/fonts/OFL-Geist-Mono.txt +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/assets/fonts/OFL-Geist.txt +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/assets/fonts/geist-latin-ext-wght-normal.woff2 +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/assets/fonts/geist-latin-wght-normal.woff2 +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/assets/fonts/geist-mono-latin-ext-wght-normal.woff2 +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/assets/fonts/geist-mono-latin-wght-normal.woff2 +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/assets/site.css +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/assets/tokens.css +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/bootstrap-stability.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/certify-and-calibrate.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/changelog.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/conformance-and-decisions.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/difference-in-differences.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/fit-an-scm.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/forecast-with-drivers.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/glossary.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/graphs-and-marks.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/heterogeneous-effects.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/identify-an-effect.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/interventions-and-counterfactuals.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/map-a-process.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/mediation.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/recover-hidden-regimes.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/refute-an-estimate.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/run-scenarios.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/synthetic-control.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/target-a-policy.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/pages/time-series-discovery.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/docsite/provenance.json +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/README.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/adjustment_birthweight.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/01_cate_basics.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/02_meta_learners_compared.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/03_is_there_heterogeneity.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/04_where_is_the_effect_higher.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/05_targeting_with_rate.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/06_per_unit_uncertainty.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/07_cate_vs_ite.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/08_identification_gating.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/09_case_study_uplift_end_to_end.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/10_causal_forest.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/11_policy_trees.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/12_model_selection.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/13_case_study_phase2.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/cate/README.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/confounding_berkeley.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/discovery_asia.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/double_ml_pension.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/hidden_regimes.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/latent_switch.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/scm/01_three_rungs.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/scm/02_honesty_and_tipping_point.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/scm/03_causal_price_optimization.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/scm/04_counterfactual_recourse.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/scm/05_counterfactual_fairness.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/scm/06_causal_attribution.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/scm/07_but_for_accounting.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/scm/08_off_policy_evaluation.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/scm/09_root_cause_attribution.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/scm/10_frontdoor_unmeasured_confounder.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/scm/README.md +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/examples/synthetic_control_smoking.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/public/ergodic_logomark_dark.svg +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/public/ergodic_logomark_light.svg +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/scripts/docsite/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/scripts/docsite/build.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/scripts/docsite/config.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/scripts/docsite/graphite.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/scripts/docsite/notebooks.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/scripts/docsite/reference.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/data/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/data/_dataset.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/data/_eventlog.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/data/_frame.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/data/_hierarchy.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/data/_hts.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/data/_panel.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/data/_schema.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/data/_tabular.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/data/_timeseries.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/datasets/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/datasets/_bayesnet.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/datasets/_bunch.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/datasets/_bundled.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/datasets/_tables.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/datasets/data/birthweight.csv +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/datasets/data/germany.csv +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/datasets/data/pension401k.csv +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/datasets/data/smoking.csv +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/_ci.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/_encode.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/_granger.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/_lagged.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/_probabilities.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/_result.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/_stats.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/_tsresult.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/algorithms/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/ci/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/ci/_discrete.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/ci/_gcm.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/ci/_linear.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/ci/_mixed.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/scores/_bic.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/scores/_discrete_bic.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/discovery/scores/_mixed_bic.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/_attribution.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/_baselines.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/_facade.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/_fit.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/_mechanism.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/_metrics.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/_reconcile.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/_result.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/_scalers.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/_schedule.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/_staged.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/_structure.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/mechanisms/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/mechanisms/_bass.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/mechanisms/_ou.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/forecast/mechanisms/_structural.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/graph/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/graph/_graph.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/graph/_io.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/graph/_marks.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/graph/_meek.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/graph/_pag.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/graph/_primitives.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/graph/_separation.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/graph/_surgery.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/identification/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/identification/_criteria.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/identification/_distribution.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/identification/_evaluate.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/identification/_functional.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/identification/_id.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/identification/_ida.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/identification/_mediation.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/identification/_recognize.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/identification/_record.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/_crossfit.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/_design.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/_estimate.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/_estimator.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/_learner.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/_perunit.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/_refute.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/_registry.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/_result.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/_scores.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/_select.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/_stats.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/_target.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_did.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_dml.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_doubly_robust.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_forest.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_frontdoor.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_its.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_iv.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_mediation.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_meta.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_null.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_plugin.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_regression.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_synthetic_control.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/estimators/_weighting.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/explain/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/explain/_blp.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/explain/_calibration.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/explain/_clan.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/explain/_gates.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/explain/_linalg.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/explain/_policy.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/explain/_rate.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/explain/_record.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/learners/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/learners/_linear.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/learners/_neighbors.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/inference/learners/_pymc.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/latent/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/latent/_engine.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/latent/_facade.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/latent/_identify.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/latent/_likelihood.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/latent/_marginalize.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/latent/_result.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/latent/likelihoods/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/latent/likelihoods/_ar.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/latent/likelihoods/_spectral.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/_case_table.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/_cases.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/_conformance.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/_decisions.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/_filters.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/_mine.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/_net.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/_panel.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/_performance.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/_soundness.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/_tree.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/process/_variants.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/py.typed +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/scm/__init__.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/scm/_bounds.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/scm/_compose.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/scm/_district.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/scm/_mechanism.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/scm/_noise.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/scm/_result.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/scm/_sampling.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/scm/_scm.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/welt/_client.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/src/ergodic/welt/_data.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/conftest.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/data/exp0626_decoder_parity.json +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_bayes.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_case_table.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_cate.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_cate_forest.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_cate_phase2_stress.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_cate_policy.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_cate_select.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_cate_stress.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_conformance.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_data.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_datasets.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_decisions.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_did.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_bootstrap.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_boss.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_ci.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_fci.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_ges.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_glasso.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_grasp.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_hc.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_lingam.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_mmpc.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_pc.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_pcmci.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_rfci.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_discovery_score.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_estimators_e2.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_forecast_backtest.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_forecast_backtest_mcmc.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_forecast_core.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_forecast_explain.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_forecast_facade.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_forecast_mechanisms.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_forecast_metrics.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_forecast_reconcile.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_forecast_staged.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_forecast_structure.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_forecast_zoo.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_granger.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_graph.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_graph_format.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_graph_primitives.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_id_algorithm.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_id_integration.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_identification.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_identification_classes.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_inductive_miner.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_inference.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_its.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_kpi_panel.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_latent_calibrate.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_latent_certify.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_latent_facade.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_latent_golden.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_latent_identify.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_latent_marginalize.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_mediation.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_native_learners.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_pag.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_plugin.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_process_filters.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_refute.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_reprs.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_review_fixes.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_scm.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_scm_pymc.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_sharp_edges.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_sklearn_interop.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_smoke.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_synthetic_control.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_temporal_wiring.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_user_facing_wording.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_welt_isolation.py +0 -0
- {ergodic-0.2.0 → ergodic-0.3.0}/tests/test_workflow_net.py +0 -0
|
@@ -7,9 +7,242 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [0.
|
|
10
|
+
## [0.3.0] - 2026-10-17
|
|
11
11
|
|
|
12
|
-
To be released together with welt-client 0.
|
|
12
|
+
To be released together with welt-client 0.14 (API-164): decoding with domain knowledge
|
|
13
|
+
(API-151), graph evaluation (API-152) and the Welt Chronos-2 forecaster (API-163).
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- Soft domain knowledge. `require`, `forbid`, `forbid_adjacency`, `forbid_between`,
|
|
17
|
+
`order`, `with_tiers`, `root`, `sink` and `restrict_to` take `confidence=`. Left
|
|
18
|
+
out (or 1) a statement is the hard constraint it always was. A value in `[0.5, 1)`
|
|
19
|
+
makes it soft: it lands in the new `DomainKnowledge.soft` field as a
|
|
20
|
+
`KnowledgeStatement` (checked on construction), and 0.5 changes nothing. Values
|
|
21
|
+
below 0.5, above 1, NaN or a bool raise `ValueError` (state the opposite instead).
|
|
22
|
+
The confidence applies to each pair a statement covers. `confound` stays hard
|
|
23
|
+
only. `&` pools soft statements as a set, so a statement made twice counts once.
|
|
24
|
+
- `DomainKnowledge.log_odds(variables)`: the soft statements' summed log likelihood
|
|
25
|
+
ratios on each directed edge, against "no edge" on its pair. `log_prior(graph)` and
|
|
26
|
+
`energy(graph)`, which used to raise, now score a graph under the soft statements
|
|
27
|
+
(minus infinity when it breaks a hard constraint). Soft orders are weighed pair by
|
|
28
|
+
pair and are not closed transitively. `DomainKnowledge.statements()` lists every
|
|
29
|
+
statement, read from the stored fields (hard) and the soft set, so equal knowledge
|
|
30
|
+
lists equal statements. `DomainKnowledge.hard()` drops the soft statements.
|
|
31
|
+
- `decode(..., knowledge=)` weighs soft statements: each pair's directed states are
|
|
32
|
+
multiplied by the statement ratios and renormalized before any decoder reads them,
|
|
33
|
+
so all six decoders run unchanged and `exact_map` is exact on the combined score.
|
|
34
|
+
A soft weight on what a hard constraint settles is dropped. Greedy with
|
|
35
|
+
`threshold=` multiplies the input value's odds by the ratio on that direction.
|
|
36
|
+
`diagnostics["knowledge_objective"]` is the score on the weighted states;
|
|
37
|
+
`objective` keeps scoring the input.
|
|
38
|
+
- `decode` with `confound(a, b)` returns an ADMG: the directed part is decoded as
|
|
39
|
+
before and `a <-> b` is added, to the graph and every candidate. A pair that also
|
|
40
|
+
got a directed edge (a bow) carries its confounder as an explicit latent node
|
|
41
|
+
`L__a__b`. `identify_effect` reads both. `diagnostics` add `graph_kind`,
|
|
42
|
+
`confounded_pairs` and `latent_confounders`; the repr counts observed variables and
|
|
43
|
+
names the latent confounders.
|
|
44
|
+
- A knowledge audit on every decode with knowledge: `diagnostics["knowledge_audit"]`
|
|
45
|
+
has one entry per statement (the model's probability that it holds, from direct
|
|
46
|
+
edges; the weakest of its pairs and the pairs below 0.1; whether it holds, an order
|
|
47
|
+
read through directed paths, in the decoded graph and in a knowledge-free decode
|
|
48
|
+
with the same settings and seed), `knowledge_cost` the score the knowledge cost,
|
|
49
|
+
and `knowledge_conflicts` the statements with a pair the model gives under 0.1.
|
|
50
|
+
`knowledge_violations_without_knowledge` lists what `violations()` finds on the
|
|
51
|
+
knowledge-free graph, `confound` pairs left out, so an order broken only through
|
|
52
|
+
the closure shows too.
|
|
53
|
+
`n_hard_statements` and `n_soft_statements` count them. `decode(..., audit=False)`
|
|
54
|
+
and `Decoder(..., audit=False)` skip it.
|
|
55
|
+
- `ergodic.KnowledgeConflictWarning` (a `UserWarning`), raised once by a decode whose
|
|
56
|
+
knowledge strongly conflicts with the model, pointing at your call.
|
|
57
|
+
- `test_graph(candidate, data)` (also `ergodic.discovery.test_graph`) tests a
|
|
58
|
+
candidate graph against data (API-152, DEC-082). It lists one implied
|
|
59
|
+
independence per pair of observed variables without an edge, tests each with the
|
|
60
|
+
conditional-independence test `discover` would pick from the columns (or `test=`),
|
|
61
|
+
and combines the p-values with Fisher's C on `2k` degrees of freedom. A DAG uses
|
|
62
|
+
Shipley's basis set (the parents of both); a CPDAG uses the same set in its
|
|
63
|
+
consistent extension; an ADMG, a MAG, a DAG with `latent=` or `selection=` nodes
|
|
64
|
+
and a PAG (through one member MAG) use m-separation, with the parents of both when
|
|
65
|
+
they separate and otherwise a minimal set of the pair's observed ancestors. Every
|
|
66
|
+
conditioning set is checked against the graph's separation routine, and a pair no
|
|
67
|
+
observed set separates is reported in `untestable`. The result, a frozen
|
|
68
|
+
`GraphTest`, carries the statistic, p-value, `k`, the test, `alpha`, notes, and the
|
|
69
|
+
claims (`ImpliedIndependence`) ranked by p-value with Holm-adjusted p-values and
|
|
70
|
+
decisions; `to_dict()` and `to_frame()` export it. The combined p-value is the
|
|
71
|
+
level-`alpha` decision (`rejected`); the Holm decisions locate the failing claims.
|
|
72
|
+
Claims whose test has zero degrees of freedom go to `vacuous` and are left out of
|
|
73
|
+
`k`. An infinite value in an observed continuous column, or a non-finite p-value or
|
|
74
|
+
statistic from the test, raises instead of reading as a pass; missing rows are
|
|
75
|
+
dropped with a note. Only the default partial-correlation test is calibrated; the
|
|
76
|
+
result notes any other test, and says that `GCM` with a nearest-neighbour learner
|
|
77
|
+
and G squared with fewer than 1,000 rows over-reject true graphs. Claims whose
|
|
78
|
+
p-values tie (for example, underflowed to 0) rank by the larger `|statistic|`. The
|
|
79
|
+
p-value cannot separate Markov-equivalent graphs and a pass does not confirm the
|
|
80
|
+
graph; the new guide "Test a graph against data" says so. Size with the default
|
|
81
|
+
partial-correlation test on six-variable linear-Gaussian worlds at `alpha = 0.05`:
|
|
82
|
+
the registered run (200 worlds per sample size) rejected the true graph in 9.5% of
|
|
83
|
+
worlds with 200 rows, outside its [2%, 8%] band, and 4.5% with 1,000; a
|
|
84
|
+
pre-registered replication on 2,000 fresh worlds per size gave 4.65% [3.77%, 5.67%]
|
|
85
|
+
and 4.85% [3.95%, 5.88%], inside its [3.5%, 6.5%] band. Power against one missing
|
|
86
|
+
edge of weight at least 0.5 is close to 1.
|
|
87
|
+
- `ergodic.welt.WeltForecaster` (also importable as `ergodic.welt.Chronos`) runs
|
|
88
|
+
Welt's hosted Chronos-2 as an ergodic `ForecastModel` (API-163, DEC-087). `fit`
|
|
89
|
+
checks the columns and keeps the window locally; each `forecast(horizon, *, seed,
|
|
90
|
+
future=None)` is one paid `POST /v1/forecasts` job (DEC-085), sent with
|
|
91
|
+
`welt.Client.submit_forecast` and read with the SDK's `Job.result`. Every target column
|
|
92
|
+
is one series of a panel by default (`cross_learning=False`), or the targets of one
|
|
93
|
+
series with `multivariate=True`. `past_covariates=` and `future_covariates=` map to
|
|
94
|
+
Welt's covariate roles, categorical by the dataset's schema (cells sent as strings
|
|
95
|
+
or integers, `True` as `1`; other cells as finite numbers, a boolean as 0.0/1.0);
|
|
96
|
+
future covariates need `future=` (a dataframe or `TimeSeriesData`, only those
|
|
97
|
+
columns are read). A
|
|
98
|
+
`HierarchicalTSData` is forecast at every node (an aggregate without a column from
|
|
99
|
+
its children's summed history, a node left out of `targets=` from its children's
|
|
100
|
+
draws), and `reconcile=` reconciles inside `forecast`. The first forecast reads the
|
|
101
|
+
catalogue entry (free) and refuses, before paying, a model without the `forecast`
|
|
102
|
+
operation or a request outside every measured `forecast_envelopes` corner;
|
|
103
|
+
`max_context=` sends only the most recent rows. Tables always go inline, as
|
|
104
|
+
welt-client sends them, and a request over `welt.forecast.MAX_REQUEST_BYTES`
|
|
105
|
+
(the API's 10 MiB limit) is refused before sending. The first job's model and
|
|
106
|
+
configuration versions are required of every later job of the forecaster and its
|
|
107
|
+
copies (and checked against each result), which also share one client and one
|
|
108
|
+
`max_forecasts` budget (10) of jobs Welt accepted. Each node's
|
|
109
|
+
`WeltForecastDiagnostics` records the job id, versions, quantile levels, Welt's own
|
|
110
|
+
quantiles, `context_length` and `rearranged_steps`. A numeric time index, or a
|
|
111
|
+
datetime index on a calendar Welt has no unit for (`B`, `C`, `BME`, `SME` and the
|
|
112
|
+
like, declared or inferred by pandas; a declared one is trusted as given), is sent as
|
|
113
|
+
consecutive days from 2000-01-01; any other irregular datetime index
|
|
114
|
+
(daily data with missing days, say) is refused with a hint to reindex and leave
|
|
115
|
+
the gaps as NaN. `NATIVE_QUANTILE_LEVELS` lists the 21 levels requested by default.
|
|
116
|
+
- `ergodic.forecast.quantile_draws(levels, quantiles, *, draws, seed)` turns
|
|
117
|
+
per-step quantiles into `(S, H)` draws by inverse-CDF sampling: rows sorted
|
|
118
|
+
(monotone rearrangement), linear between levels, exponential tails matched to the
|
|
119
|
+
density at the outer levels, each step sampled independently. The draws reproduce
|
|
120
|
+
the per-step marginals only, so sums over steps or series, and the intervals,
|
|
121
|
+
coverage and CRPS of a `bottom_up` or `mint` reconciliation, treat the errors as
|
|
122
|
+
independent.
|
|
123
|
+
- `ergodic.forecast.CovariateForecastModel`: a `ForecastModel` that names
|
|
124
|
+
`future_covariates` and takes their values over the horizon as
|
|
125
|
+
`forecast(..., future=...)`. `backtest` hands such a model, at each origin, those
|
|
126
|
+
columns over the held-out window and nothing else, and records them in
|
|
127
|
+
`BacktestReport.future_covariates`. It refuses, before any fit, a declared
|
|
128
|
+
covariate that is not a column, a string in place of a sequence, and one the model
|
|
129
|
+
names among its `targets`; a model that forecasts a declared covariate without
|
|
130
|
+
naming it is refused on the first fold's result. Models without the attribute are called
|
|
131
|
+
exactly as before.
|
|
132
|
+
- New guide "Forecast with Welt's Chronos-2": forecast with a known promotion
|
|
133
|
+
calendar, backtest against baselines, and reconcile a hierarchy.
|
|
134
|
+
|
|
135
|
+
- A posterior over DAGs under a method (API-152, DEC-082). `graph_posterior(probabilities)`
|
|
136
|
+
weighs each DAG by its pair log score (the pair states the decoders read) plus the
|
|
137
|
+
knowledge's `log_prior`, over the DAGs the hard knowledge allows; order statements are
|
|
138
|
+
read ancestrally, as `violations` reads them. `graph_posterior(data, score=...)` uses a
|
|
139
|
+
decomposable score with a prior uniform over DAGs times the knowledge; BGe and BDeu are
|
|
140
|
+
marginal likelihoods, the BIC family is labelled approximate. The result,
|
|
141
|
+
`GraphSamples`, holds the distinct DAGs with weights, `edge_probabilities()` (pair
|
|
142
|
+
states) with `edge_errors()`, `probability(feature)` with a Monte Carlo error,
|
|
143
|
+
`log_target(graph)`, `best_graph` and `top(k)`. It is exact when it can be: every DAG
|
|
144
|
+
enumerated up to 4 variables (5 for a score), and for edge probabilities without a
|
|
145
|
+
path-level order constraint a subset recursion over sink sets (about `3^n` steps, up
|
|
146
|
+
to `max_exact=15`) that gives the exact normalizer, exact edge marginals, exact draws
|
|
147
|
+
and the exact best graph. Otherwise multi-chain structure MCMC (single-pair add,
|
|
148
|
+
delete and reverse moves; each chain a four-rung parallel-tempering ladder; chains
|
|
149
|
+
from the greedy decode and random DAGs) with split
|
|
150
|
+
R-hat and bulk effective sample sizes, Rao-Blackwellized edge marginals for edge
|
|
151
|
+
probabilities, and a `PosteriorConvergenceWarning`.
|
|
152
|
+
- `evaluate_graph(candidate, probabilities_or_samples)` reads a DAG, CPDAG, PAG, MAG or
|
|
153
|
+
ADMG against that posterior (`GraphEvaluation`): the log-ratio to the best graph, the
|
|
154
|
+
credible level (the mass ranked strictly above, ties half; a Bayesian tail
|
|
155
|
+
probability, not a p-value), one `GraphClaim` per statement with its probability and
|
|
156
|
+
Monte Carlo error, the class probability of a CPDAG, the expected SHD against the
|
|
157
|
+
between-draw baseline (with the former's Monte Carlo error), and P(acyclic) under raw
|
|
158
|
+
independent marginals. When every draw agrees, a Monte Carlo error is the rule-of-three
|
|
159
|
+
bound `3 / draws` (`bound` on `FeatureProbability`, `GraphClaim` and
|
|
160
|
+
`AdjustmentGroup`) rather than 0, and under the exact
|
|
161
|
+
recursion the candidate's own share of its credible level is exact. A bidirected
|
|
162
|
+
edge or latent node is listed as not assessable.
|
|
163
|
+
- Effects over a posterior over DAGs (DEC-082 decision 6). `adjustment_probability(samples,
|
|
164
|
+
treatment, outcome, adjustment)` is the posterior probability that a set satisfies the
|
|
165
|
+
adjustment criterion. `average_effect(samples, data, treatment, outcome)` groups the
|
|
166
|
+
DAGs by the adjustment set identification picks, estimates once per set (the family
|
|
167
|
+
default, seeded; `strategy=`, `learner=`, `rule="minimal"`) and returns an
|
|
168
|
+
`AveragedEffect`: the `AdjustmentGroup`s (set, mass with its Monte Carlo error, DAG
|
|
169
|
+
count, estimate, standard error), the mixture mean with its Monte Carlo error from the
|
|
170
|
+
masses, and its variance by the law of
|
|
171
|
+
total variance, and the zero-effect (no directed path), unidentified (a variable the
|
|
172
|
+
data lacks makes every set invalid) and truncated (beyond `max_sets`) masses, the last
|
|
173
|
+
two left out of the mixture and reported.
|
|
174
|
+
- The `BGe` score (`score="bge"`): the linear-Gaussian marginal likelihood of Geiger and
|
|
175
|
+
Heckerman with the Kuipers, Moffa and Heckerman correction and an empirical-Bayes prior
|
|
176
|
+
mean (the sample mean; BiDAG uses zero, which agrees on centred data), decomposable and
|
|
177
|
+
score-equivalent, for `graph_posterior` and the score-based searches.
|
|
178
|
+
`Score.marginal_likelihood` says whether a score is one (BDeu, BGe).
|
|
179
|
+
|
|
180
|
+
### Changed
|
|
181
|
+
- A decode with knowledge, hard-only knowledge included, now audits it: one extra
|
|
182
|
+
knowledge-free decode, which can cost more than the constrained one, and a
|
|
183
|
+
`KnowledgeConflictWarning` on strong conflicts. Code that turns warnings into
|
|
184
|
+
errors will see it; pass `audit=False` or filter the category.
|
|
185
|
+
- The decoder aliases `"expected_count"` and `"soft_f1"` now resolve to the new
|
|
186
|
+
`expected_count_v2` and `soft_f1_v2`, which take their edge budget from the pair
|
|
187
|
+
states with the hard knowledge applied (a forbidden direction holds no mass, a
|
|
188
|
+
required one all of it), so a soft statement near 1 gives the hard result's budget.
|
|
189
|
+
`expected_count_v1` and `soft_f1_v1` keep their 0.2 results; without knowledge the
|
|
190
|
+
two versions agree.
|
|
191
|
+
- `Glasso.fit` validates the knowledge first and raises on a contradiction (a
|
|
192
|
+
confounded pair under an adjacency ban or outside a `restrict_to` support, for
|
|
193
|
+
example) instead of dropping part of it.
|
|
194
|
+
- The discovery searches (`PC`, `FCI`, `RFCI`, `GES`, `BOSS`, `GRaSP`, `HillClimb`,
|
|
195
|
+
`AStar`, `MMPC`, `DirectLiNGAM`, `Glasso`, `PCMCI`) and `bootstrap` raise
|
|
196
|
+
`ValueError` on soft statements instead of dropping them; pass `knowledge.hard()`.
|
|
197
|
+
- `forbid_adjacency(a, b)` also records the pair in a new `nonadjacent` field: an
|
|
198
|
+
adjacency ban rules out a bidirected edge too, while `forbid(a, b)` with
|
|
199
|
+
`forbid(b, a)` no longer does. So `confound(a, b)` with the two directed bans means
|
|
200
|
+
"confounded, and neither causes the other": it is not a conflict, the decoders
|
|
201
|
+
return `a <-> b`, FCI and RFCI keep the pair adjacent instead of pruning it, MMPC
|
|
202
|
+
keeps it in its skeleton and glasso no longer zeroes it. `forbid_adjacency(a, b)`
|
|
203
|
+
and the two directed bans no longer compare equal. The repr is unchanged. Every
|
|
204
|
+
`nonadjacent` pair also forbids both directed edges, however the object is built.
|
|
205
|
+
- A `DomainKnowledge` built directly with both directions of a pair in `forbidden`
|
|
206
|
+
(the constructor or `dataclasses.replace`) no longer bans a bidirected edge on
|
|
207
|
+
that pair; use `forbid_adjacency` or `nonadjacent=` for that.
|
|
208
|
+
- `DomainKnowledge.apply_to` keeps a bidirected edge on a pair forbidden in both
|
|
209
|
+
directions; only an adjacency ban removes every mark.
|
|
210
|
+
- `DomainKnowledge.conflicts()` reports a confounded pair under an adjacency ban.
|
|
211
|
+
`violations()` reads a node in `graph.latent` as a hidden cause: a latent node with
|
|
212
|
+
two or more observed children joins each pair of them as a bidirected edge would
|
|
213
|
+
(for `confound`, adjacency bans and a skeleton restriction), and edges at a latent
|
|
214
|
+
node count against neither a root nor a sink.
|
|
215
|
+
- `ergodic.welt.discover(data, model, knowledge=k)` without `decoder=` decodes with
|
|
216
|
+
greedy at the model's native threshold (greedy's default rule when the model
|
|
217
|
+
records none), as `decoder="greedy"` does, instead of raising. Confounded knowledge
|
|
218
|
+
is no longer refused before the paid run; knowledge naming unknown variables or
|
|
219
|
+
contradicting itself still is. Without knowledge and without a decoder nothing
|
|
220
|
+
changes.
|
|
221
|
+
- Pickles of `DomainKnowledge` from 0.2.x load, with no soft statements. A pair the
|
|
222
|
+
pickle forbids in both directions becomes an adjacency ban (`nonadjacent`), its
|
|
223
|
+
0.2 meaning, so it still rules out a bidirected edge.
|
|
224
|
+
- The `welt` extra requires `welt-client>=0.14`, the release that serves Chronos-2
|
|
225
|
+
forecasting (DEC-085): `WeltForecaster` submits through
|
|
226
|
+
`welt.Client.submit_forecast` and waits with the SDK's `Job.result`.
|
|
227
|
+
|
|
228
|
+
## [0.2.1] - 2026-10-15
|
|
229
|
+
|
|
230
|
+
### Fixed
|
|
231
|
+
- `WeltLearner` fits a slot with no feature columns locally. An empty adjustment set
|
|
232
|
+
leaves nothing for a model to learn, so the nuisance is the training mean (or the
|
|
233
|
+
class frequencies for classification): no upload, no paid fit, no charge to
|
|
234
|
+
`max_fits`, and `predictor_id_` is `None`. In 0.2.0 it raised, so the "Discover in
|
|
235
|
+
Welt, estimate in ergodic" guide stopped whenever Welt's Arrow found no confounders
|
|
236
|
+
for the treatment, as it does on the guide's own data today. With no adjustment
|
|
237
|
+
variables, DML is then the cross-fitted regression slope of the outcome on the
|
|
238
|
+
treatment, identical to DML with ergodic's `ols` learner.
|
|
239
|
+
- `ArcStats` treats two NaN gaps (START and END arcs) as equal and hashes them alike,
|
|
240
|
+
so `process_map(log) == process_map(log)` holds on Python 3.13 and 3.14, where
|
|
241
|
+
dataclass equality compares fields one by one.
|
|
242
|
+
|
|
243
|
+
## [0.2.0] - 2026-10-15
|
|
244
|
+
|
|
245
|
+
Released together with welt-client 0.13.
|
|
13
246
|
|
|
14
247
|
### Added
|
|
15
248
|
- A versioned graph format. `MixedGraph.to_dict()` writes
|
|
@@ -710,7 +943,9 @@ inference, discovery, process, SCM, and forecast pillars.
|
|
|
710
943
|
silently with single-graph semantics; it now dispatches on the face, and
|
|
711
944
|
mixed graphs raise instead of being misread.
|
|
712
945
|
|
|
713
|
-
[Unreleased]: https://github.com/ergodic-ai/ergodic/compare/v0.
|
|
946
|
+
[Unreleased]: https://github.com/ergodic-ai/ergodic/compare/v0.3.0...HEAD
|
|
947
|
+
[0.3.0]: https://github.com/ergodic-ai/ergodic/compare/v0.2.1...v0.3.0
|
|
948
|
+
[0.2.1]: https://github.com/ergodic-ai/ergodic/compare/v0.2.0...v0.2.1
|
|
714
949
|
[0.2.0]: https://github.com/ergodic-ai/ergodic/compare/v0.1.1...v0.2.0
|
|
715
950
|
[0.1.1]: https://github.com/ergodic-ai/ergodic/compare/v0.1.0...v0.1.1
|
|
716
951
|
[0.1.0]: https://github.com/ergodic-ai/ergodic/releases/tag/v0.1.0
|
|
@@ -83,8 +83,7 @@ generated artifacts (model outputs, caches, build directories).
|
|
|
83
83
|
|
|
84
84
|
## Commits and pull requests
|
|
85
85
|
|
|
86
|
-
- Branch from `
|
|
87
|
-
release merges from `dev`.
|
|
86
|
+
- Branch from `main` and open the pull request against `main`.
|
|
88
87
|
- Write commit subjects in the imperative, prefixed with the area they touch, for
|
|
89
88
|
example `discovery: add the RFCI orientation rules` or `docs: fix the panel guide
|
|
90
89
|
example`. Use the body to say why, not what.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: ergodic
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Causal AI: causal discovery, causal inference, and process intelligence.
|
|
5
5
|
Project-URL: Homepage, https://docs.ergodic.dev
|
|
6
6
|
Project-URL: Documentation, https://docs.ergodic.dev
|
|
@@ -41,7 +41,7 @@ Requires-Dist: torch>=2.2; extra == 'neural'
|
|
|
41
41
|
Provides-Extra: scm
|
|
42
42
|
Requires-Dist: pymc>=5; extra == 'scm'
|
|
43
43
|
Provides-Extra: welt
|
|
44
|
-
Requires-Dist: welt-client>=0.
|
|
44
|
+
Requires-Dist: welt-client>=0.14; (python_version < '3.14') and extra == 'welt'
|
|
45
45
|
Description-Content-Type: text/markdown
|
|
46
46
|
|
|
47
47
|
# ergodic
|
|
@@ -136,6 +136,7 @@ DAGs isn't supported. A class with more than `max_members=1000` members also rai
|
|
|
136
136
|
<div class="cards" markdown="1">
|
|
137
137
|
|
|
138
138
|
- [Estimate an average effect](estimate-average-effect.md): estimate with the set you found.
|
|
139
|
+
- [Average an effect over the graphs](evaluate-a-graph.md#average-an-effect-over-the-graphs): how likely a set is valid when the graph is uncertain.
|
|
139
140
|
- [Estimate a mediated effect](mediation.md): split the effect through `W` into direct and indirect parts.
|
|
140
141
|
- [Python reference](reference-identification.md): every function on this page.
|
|
141
142
|
|
|
@@ -66,13 +66,15 @@ Identification(not identifiable, ['mbsmoke'] -> ['bweight'])
|
|
|
66
66
|
| Discovery: PC, GES | Independent rows; every common cause measured; independences in the data come from the graph (faithfulness); the test or score fits the data | Refuses time-series and panel data for these methods | Hidden causes, faithfulness |
|
|
67
67
|
| Discovery: FCI, RFCI | As PC, but hidden common causes and selection are allowed | The same | Faithfulness |
|
|
68
68
|
| Discovery: LiNGAM | Linear effects, independent non-Gaussian noise, no hidden causes | Nothing about Gaussianity: on Gaussian data the order it returns is arbitrary | Every assumption |
|
|
69
|
+
| Testing a graph | Independent rows; the test fits the data | The independences each missing edge implies (`test_graph`) | Edges the graph has, and directions within its equivalence class |
|
|
69
70
|
| Identification | The graph is right | Whether the graph identifies the effect, and how | The graph itself |
|
|
70
71
|
| Instruments | The graph is right, and effects are linear | Instrument validity in the graph | Linearity |
|
|
71
72
|
| Estimation | Overlap: every unit could get either treatment; the models fit, or for doubly robust estimators, one of the two models | Refuses an empty treatment arm | Overlap beyond that, model fit |
|
|
72
73
|
| Mediation | No mediator-outcome confounder is affected by the treatment | That the graph certifies it | That the world agrees |
|
|
73
74
|
|
|
74
75
|
The checks are graph checks. A graph you write down, or one discovery returns, is
|
|
75
|
-
still an assumption about the world.
|
|
76
|
+
still an assumption about the world. [Test a graph against data](test-a-graph.md) can
|
|
77
|
+
reject one whose missing edges the data contradict, but a pass doesn't confirm it.
|
|
76
78
|
|
|
77
79
|
!!! caution "A refutation does not prove an estimate"
|
|
78
80
|
`refute_effect` reruns an estimate under a perturbation, such as a placebo
|
|
@@ -106,6 +108,7 @@ criterion it uses assumes no selection.
|
|
|
106
108
|
<div class="cards" markdown="1">
|
|
107
109
|
|
|
108
110
|
- [Graphs and edge marks](graphs-and-marks.md): what each kind of graph says.
|
|
111
|
+
- [Test a graph against data](test-a-graph.md): check a graph's independences on your data.
|
|
109
112
|
- [Refute an estimate](refute-an-estimate.md): stress-test a number you have.
|
|
110
113
|
- [Estimate an average effect](estimate-average-effect.md): the full estimation walkthrough.
|
|
111
114
|
|
|
@@ -128,8 +128,14 @@ and the model you pass in is never changed.
|
|
|
128
128
|
<details markdown="1"><summary>Which models can I backtest?</summary>
|
|
129
129
|
|
|
130
130
|
Anything with `fit(data, *, seed=0)`, returning a fitted copy, and
|
|
131
|
-
`forecast(horizon, *, seed=0)`, returning a `ForecastResult`. The baselines
|
|
132
|
-
`forecast_model(...)`
|
|
131
|
+
`forecast(horizon, *, seed=0)`, returning a `ForecastResult`. The baselines,
|
|
132
|
+
`forecast_model(...)` and Welt's Chronos-2 (`ergodic.welt.WeltForecaster`) all
|
|
133
|
+
qualify, and so can your own model.
|
|
134
|
+
|
|
135
|
+
A model with a `future_covariates` attribute also gets, at each cut, those columns
|
|
136
|
+
over the held-out window as `forecast(..., future=...)`: their true values, and
|
|
137
|
+
nothing else from that window. See
|
|
138
|
+
[Forecast with Welt's Chronos-2](forecast-with-welt.md#give-it-covariates).
|
|
133
139
|
|
|
134
140
|
`forecast_model(name=..., **options)` takes every keyword of `forecast` except
|
|
135
141
|
`data` and `horizon`. A keyword `forecast` doesn't take raises at once, not at the
|
|
@@ -147,6 +153,7 @@ lists it in `nodes_unscored`.
|
|
|
147
153
|
|
|
148
154
|
- [Forecast with causal drivers](forecast-with-drivers.md): add drivers to the forecaster you just tested.
|
|
149
155
|
- [Reconcile a hierarchy](reconcile-a-hierarchy.md): forecasts that add up across levels.
|
|
156
|
+
- [Forecast with Welt's Chronos-2](forecast-with-welt.md): backtest a hosted foundation model.
|
|
150
157
|
- [Python reference](reference-forecast.md): every metric and baseline.
|
|
151
158
|
|
|
152
159
|
</div>
|
|
@@ -113,8 +113,15 @@ types: all continuous, all categorical, or a mix.
|
|
|
113
113
|
| `"bic"` | `BIC` | Continuous data, Gaussian linear model. |
|
|
114
114
|
| `"bic_discrete"`, `"discrete_bic"` | `DiscreteBIC` | Categorical data. |
|
|
115
115
|
| `"bdeu"` | `BDeu` | Categorical data, Bayesian score with `ess=10.0`. |
|
|
116
|
+
| `"bge"` | `BGe` | Continuous data, linear Gaussian model, Bayesian score (the marginal likelihood). |
|
|
116
117
|
| `"bic_mixed"`, `"mixed_bic"` | `MixedBIC` | A mix of column types. |
|
|
117
118
|
|
|
119
|
+
BDeu and BGe are marginal likelihoods, so a score search looks for their
|
|
120
|
+
highest-scoring graph, the posterior mode under a uniform prior. The searches are
|
|
121
|
+
heuristic except A*, and GES returns the mode's equivalence class as a CPDAG.
|
|
122
|
+
`graph_posterior(data, score="bge")` gives the whole posterior over DAGs. See
|
|
123
|
+
[Evaluate a candidate graph](evaluate-a-graph.md#get-a-posterior-from-data-with-a-score).
|
|
124
|
+
|
|
118
125
|
## Give GCM a learner
|
|
119
126
|
|
|
120
127
|
`GCM` turns any regression model into a test. `learner=` takes an alias (`"ols"`,
|
|
@@ -154,6 +161,7 @@ and restrict the search to the screen (see
|
|
|
154
161
|
<div class="cards" markdown="1">
|
|
155
162
|
|
|
156
163
|
- [Check stability with the bootstrap](bootstrap-stability.md): see how much of the graph survives resampling.
|
|
164
|
+
- [Evaluate a candidate graph](evaluate-a-graph.md): a posterior over DAGs from a score, and a graph read against it.
|
|
157
165
|
- [Add domain knowledge](domain-knowledge.md): orient what no test or score can.
|
|
158
166
|
- [Python reference](reference-discovery.md): every method, test and score.
|
|
159
167
|
|
|
@@ -11,14 +11,18 @@ needs to become an ergodic graph. The link between them is a versioned graph for
|
|
|
11
11
|
|
|
12
12
|
| ergodic | welt-client | Graph format | Python for the Welt link |
|
|
13
13
|
| --- | --- | --- | --- |
|
|
14
|
+
| 0.3.x | 0.14 or later | `ergodic.graph/1` | 3.11, 3.12, 3.13 |
|
|
14
15
|
| 0.2.x | 0.13 or later | `ergodic.graph/1` | 3.11, 3.12, 3.13 |
|
|
15
16
|
| 0.1.x | none | none | none |
|
|
16
17
|
|
|
17
18
|
Both packages pin the other from their own side:
|
|
18
19
|
|
|
19
|
-
- `pip install "ergodic[welt]"` adds `welt-client>=0.
|
|
20
|
+
- `pip install "ergodic[welt]"` adds `welt-client>=0.14` on Python 3.11 to 3.13
|
|
21
|
+
(`>=0.13` for ergodic 0.2). 0.14 is the release that serves forecasting with
|
|
22
|
+
Chronos-2.
|
|
20
23
|
On Python 3.14 the extra adds nothing, because welt-client does not support it.
|
|
21
|
-
- `pip install "welt-client[ergodic]"` adds `ergodic>=0.2,<0.
|
|
24
|
+
- `pip install "welt-client[ergodic]"` adds `ergodic>=0.2,<0.4` from welt-client 0.14
|
|
25
|
+
(`ergodic>=0.2,<0.3` with welt-client 0.13).
|
|
22
26
|
|
|
23
27
|
welt-client also brings numpy 2 and scikit-learn into your environment.
|
|
24
28
|
|
|
@@ -58,7 +62,7 @@ True
|
|
|
58
62
|
ValueError: unsupported graph format 'ergodic.graph/2'; this version of ergodic reads 'ergodic.graph/1' (a dict without a 'format' field is read as 'ergodic.graph/1')
|
|
59
63
|
```
|
|
60
64
|
|
|
61
|
-
- **Step 1.** ergodic 0.2
|
|
65
|
+
- **Step 1.** ergodic 0.2 and 0.3 read and write `ergodic.graph/1`.
|
|
62
66
|
- **Step 2.** The dict holds the format, the kind, the nodes and one entry per edge,
|
|
63
67
|
with a mark at each end: `tail` or `arrow` for a DAG.
|
|
64
68
|
- **Step 3.** The round trip gives back an equal graph.
|
|
@@ -74,7 +78,7 @@ Only a graph that Welt declares a native DAG converts. `CausalResult.to_ergodic(
|
|
|
74
78
|
in welt-client keeps every variable, unconnected ones included, and the native
|
|
75
79
|
edge directions. It never projects, thresholds or relabels a graph into a DAG.
|
|
76
80
|
|
|
77
|
-
| Welt model | Native graph | In ergodic 0.2.
|
|
81
|
+
| Welt model | Native graph | In ergodic 0.2 and 0.3 |
|
|
78
82
|
| --- | --- | --- |
|
|
79
83
|
| `arrow` | DAG | Converts. `ergodic.welt.discover` returns it as a `DiscoveryResult`. |
|
|
80
84
|
| `cdfm` | Directed, may hold cycles | Refused before paying by default. With an explicit `decoder=`, its scores are decoded locally into a DAG labelled decoded. |
|