auto-causal-lib 0.10.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.
- auto_causal_lib-0.10.0/PKG-INFO +524 -0
- auto_causal_lib-0.10.0/README.md +424 -0
- auto_causal_lib-0.10.0/pyproject.toml +90 -0
- auto_causal_lib-0.10.0/setup.cfg +4 -0
- auto_causal_lib-0.10.0/src/auto_causal_lib.egg-info/PKG-INFO +524 -0
- auto_causal_lib-0.10.0/src/auto_causal_lib.egg-info/SOURCES.txt +179 -0
- auto_causal_lib-0.10.0/src/auto_causal_lib.egg-info/dependency_links.txt +1 -0
- auto_causal_lib-0.10.0/src/auto_causal_lib.egg-info/entry_points.txt +3 -0
- auto_causal_lib-0.10.0/src/auto_causal_lib.egg-info/requires.txt +119 -0
- auto_causal_lib-0.10.0/src/auto_causal_lib.egg-info/top_level.txt +1 -0
- auto_causal_lib-0.10.0/src/autocausal/__init__.py +176 -0
- auto_causal_lib-0.10.0/src/autocausal/__main__.py +4 -0
- auto_causal_lib-0.10.0/src/autocausal/__version__.py +1 -0
- auto_causal_lib-0.10.0/src/autocausal/agentic/__init__.py +68 -0
- auto_causal_lib-0.10.0/src/autocausal/agentic/compact.py +168 -0
- auto_causal_lib-0.10.0/src/autocausal/agentic/graph_runtime.py +224 -0
- auto_causal_lib-0.10.0/src/autocausal/agentic/loop.py +648 -0
- auto_causal_lib-0.10.0/src/autocausal/agentic/memory.py +210 -0
- auto_causal_lib-0.10.0/src/autocausal/agentic/persist.py +84 -0
- auto_causal_lib-0.10.0/src/autocausal/agentic/report.py +156 -0
- auto_causal_lib-0.10.0/src/autocausal/agentic/state.py +136 -0
- auto_causal_lib-0.10.0/src/autocausal/agentic/vector_memory.py +243 -0
- auto_causal_lib-0.10.0/src/autocausal/api.py +1188 -0
- auto_causal_lib-0.10.0/src/autocausal/apps/__init__.py +20 -0
- auto_causal_lib-0.10.0/src/autocausal/apps/physics_streamlit.py +294 -0
- auto_causal_lib-0.10.0/src/autocausal/apps/samples.py +156 -0
- auto_causal_lib-0.10.0/src/autocausal/behavioral/__init__.py +90 -0
- auto_causal_lib-0.10.0/src/autocausal/behavioral/bridge.py +78 -0
- auto_causal_lib-0.10.0/src/autocausal/behavioral/features.py +162 -0
- auto_causal_lib-0.10.0/src/autocausal/behavioral/loaders.py +304 -0
- auto_causal_lib-0.10.0/src/autocausal/behavioral/panel.py +123 -0
- auto_causal_lib-0.10.0/src/autocausal/behavioral/report.py +219 -0
- auto_causal_lib-0.10.0/src/autocausal/behavioral/schema.py +103 -0
- auto_causal_lib-0.10.0/src/autocausal/behavioral/store.py +238 -0
- auto_causal_lib-0.10.0/src/autocausal/cli.py +1059 -0
- auto_causal_lib-0.10.0/src/autocausal/connective.py +29 -0
- auto_causal_lib-0.10.0/src/autocausal/contracts/__init__.py +37 -0
- auto_causal_lib-0.10.0/src/autocausal/contracts/envelope.py +34 -0
- auto_causal_lib-0.10.0/src/autocausal/contracts/fabric.py +241 -0
- auto_causal_lib-0.10.0/src/autocausal/data/__init__.py +1 -0
- auto_causal_lib-0.10.0/src/autocausal/data/behavioral/__init__.py +1 -0
- auto_causal_lib-0.10.0/src/autocausal/data/behavioral/habit_loop.csv +97 -0
- auto_causal_lib-0.10.0/src/autocausal/data/behavioral/nudge_ab.csv +61 -0
- auto_causal_lib-0.10.0/src/autocausal/data/behavioral/reinforcement_schedule.csv +121 -0
- auto_causal_lib-0.10.0/src/autocausal/data/demo.db +0 -0
- auto_causal_lib-0.10.0/src/autocausal/data/examples/__init__.py +1 -0
- auto_causal_lib-0.10.0/src/autocausal/data/examples/california_housing_sample.csv +251 -0
- auto_causal_lib-0.10.0/src/autocausal/data/examples/diabetes.csv +443 -0
- auto_causal_lib-0.10.0/src/autocausal/data/examples/gapminder_subset.csv +37 -0
- auto_causal_lib-0.10.0/src/autocausal/data/examples/iris.csv +151 -0
- auto_causal_lib-0.10.0/src/autocausal/data/examples/titanic.csv +892 -0
- auto_causal_lib-0.10.0/src/autocausal/data/examples/wine.csv +179 -0
- auto_causal_lib-0.10.0/src/autocausal/data/physics/affect_demo.csv +81 -0
- auto_causal_lib-0.10.0/src/autocausal/data/physics/kpi_panel_demo.csv +101 -0
- auto_causal_lib-0.10.0/src/autocausal/data/physics/markets_demo.csv +101 -0
- auto_causal_lib-0.10.0/src/autocausal/data/physics/oscillator_demo.csv +121 -0
- auto_causal_lib-0.10.0/src/autocausal/data/public/climate_demo.csv +16 -0
- auto_causal_lib-0.10.0/src/autocausal/data/public/demographics_demo.csv +6 -0
- auto_causal_lib-0.10.0/src/autocausal/data/public/finance_demo.csv +121 -0
- auto_causal_lib-0.10.0/src/autocausal/data/public/health_demo.csv +6 -0
- auto_causal_lib-0.10.0/src/autocausal/data/public/instruments_demo.csv +81 -0
- auto_causal_lib-0.10.0/src/autocausal/data/public/manifest.json +581 -0
- auto_causal_lib-0.10.0/src/autocausal/data/public/marketing_demo.csv +101 -0
- auto_causal_lib-0.10.0/src/autocausal/data/public/policy_demo.csv +97 -0
- auto_causal_lib-0.10.0/src/autocausal/data/public/vision_stub.csv +61 -0
- auto_causal_lib-0.10.0/src/autocausal/datamine_adapter.py +42 -0
- auto_causal_lib-0.10.0/src/autocausal/datasets.py +389 -0
- auto_causal_lib-0.10.0/src/autocausal/db.py +421 -0
- auto_causal_lib-0.10.0/src/autocausal/discovery.py +661 -0
- auto_causal_lib-0.10.0/src/autocausal/grail/__init__.py +85 -0
- auto_causal_lib-0.10.0/src/autocausal/grail/adapter.py +432 -0
- auto_causal_lib-0.10.0/src/autocausal/grail/guide.py +141 -0
- auto_causal_lib-0.10.0/src/autocausal/grail/hooks.py +99 -0
- auto_causal_lib-0.10.0/src/autocausal/grail/mcp_tools.py +344 -0
- auto_causal_lib-0.10.0/src/autocausal/grail/stub.py +580 -0
- auto_causal_lib-0.10.0/src/autocausal/grail/types.py +258 -0
- auto_causal_lib-0.10.0/src/autocausal/grounding.py +375 -0
- auto_causal_lib-0.10.0/src/autocausal/guides/__init__.py +316 -0
- auto_causal_lib-0.10.0/src/autocausal/guides/huggingface.py +59 -0
- auto_causal_lib-0.10.0/src/autocausal/guides/kineteq_guide.py +397 -0
- auto_causal_lib-0.10.0/src/autocausal/guides/llmintent_guide.py +312 -0
- auto_causal_lib-0.10.0/src/autocausal/guides/retracement_guide.py +277 -0
- auto_causal_lib-0.10.0/src/autocausal/guides/rule.py +81 -0
- auto_causal_lib-0.10.0/src/autocausal/guides/types.py +287 -0
- auto_causal_lib-0.10.0/src/autocausal/impute.py +283 -0
- auto_causal_lib-0.10.0/src/autocausal/ingest.py +327 -0
- auto_causal_lib-0.10.0/src/autocausal/insight/__init__.py +68 -0
- auto_causal_lib-0.10.0/src/autocausal/insight/cli_hooks.py +245 -0
- auto_causal_lib-0.10.0/src/autocausal/insight/experiments.py +404 -0
- auto_causal_lib-0.10.0/src/autocausal/insight/narrator.py +168 -0
- auto_causal_lib-0.10.0/src/autocausal/insight/report.py +282 -0
- auto_causal_lib-0.10.0/src/autocausal/insight/suite.py +829 -0
- auto_causal_lib-0.10.0/src/autocausal/isolates_bridge.py +74 -0
- auto_causal_lib-0.10.0/src/autocausal/iv.py +147 -0
- auto_causal_lib-0.10.0/src/autocausal/join.py +140 -0
- auto_causal_lib-0.10.0/src/autocausal/mcp/__init__.py +42 -0
- auto_causal_lib-0.10.0/src/autocausal/mcp/__main__.py +8 -0
- auto_causal_lib-0.10.0/src/autocausal/mcp/hooks.py +79 -0
- auto_causal_lib-0.10.0/src/autocausal/mcp/registry.py +946 -0
- auto_causal_lib-0.10.0/src/autocausal/mcp/serialize.py +60 -0
- auto_causal_lib-0.10.0/src/autocausal/mcp/server.py +128 -0
- auto_causal_lib-0.10.0/src/autocausal/mcp/session.py +94 -0
- auto_causal_lib-0.10.0/src/autocausal/mining.py +356 -0
- auto_causal_lib-0.10.0/src/autocausal/ml/__init__.py +34 -0
- auto_causal_lib-0.10.0/src/autocausal/ml/construct.py +357 -0
- auto_causal_lib-0.10.0/src/autocausal/ml/fit_report.py +72 -0
- auto_causal_lib-0.10.0/src/autocausal/ml/imputers.py +129 -0
- auto_causal_lib-0.10.0/src/autocausal/ml/loop.py +322 -0
- auto_causal_lib-0.10.0/src/autocausal/ml/predictors.py +83 -0
- auto_causal_lib-0.10.0/src/autocausal/ml/schemas/FitReport.json +25 -0
- auto_causal_lib-0.10.0/src/autocausal/ml/schemas/ModelSpec.json +26 -0
- auto_causal_lib-0.10.0/src/autocausal/ml/torch_models.py +322 -0
- auto_causal_lib-0.10.0/src/autocausal/nlp/__init__.py +79 -0
- auto_causal_lib-0.10.0/src/autocausal/nlp/backend.py +161 -0
- auto_causal_lib-0.10.0/src/autocausal/nlp/builder.py +74 -0
- auto_causal_lib-0.10.0/src/autocausal/nlp/features.py +139 -0
- auto_causal_lib-0.10.0/src/autocausal/nlp/hints.py +156 -0
- auto_causal_lib-0.10.0/src/autocausal/nlp/keywords.py +285 -0
- auto_causal_lib-0.10.0/src/autocausal/nlp/sentiment.py +143 -0
- auto_causal_lib-0.10.0/src/autocausal/nlp/tokenize.py +230 -0
- auto_causal_lib-0.10.0/src/autocausal/panel.py +179 -0
- auto_causal_lib-0.10.0/src/autocausal/physics/__init__.py +50 -0
- auto_causal_lib-0.10.0/src/autocausal/physics/engine.py +270 -0
- auto_causal_lib-0.10.0/src/autocausal/physics/grounding.py +372 -0
- auto_causal_lib-0.10.0/src/autocausal/physics/suite.py +205 -0
- auto_causal_lib-0.10.0/src/autocausal/physics/types.py +264 -0
- auto_causal_lib-0.10.0/src/autocausal/public_causal.py +342 -0
- auto_causal_lib-0.10.0/src/autocausal/public_suite.py +975 -0
- auto_causal_lib-0.10.0/src/autocausal/py.typed +1 -0
- auto_causal_lib-0.10.0/src/autocausal/qc.py +243 -0
- auto_causal_lib-0.10.0/src/autocausal/report.py +172 -0
- auto_causal_lib-0.10.0/src/autocausal/results.py +149 -0
- auto_causal_lib-0.10.0/src/autocausal/roles.py +90 -0
- auto_causal_lib-0.10.0/src/autocausal/sensitivity.py +369 -0
- auto_causal_lib-0.10.0/src/autocausal/skilling/__init__.py +34 -0
- auto_causal_lib-0.10.0/src/autocausal/skilling/broker.py +266 -0
- auto_causal_lib-0.10.0/src/autocausal/skilling/catalog.py +89 -0
- auto_causal_lib-0.10.0/src/autocausal/skilling/registry.py +132 -0
- auto_causal_lib-0.10.0/src/autocausal/skilling/surface.py +314 -0
- auto_causal_lib-0.10.0/src/autocausal/skilling/trace.py +36 -0
- auto_causal_lib-0.10.0/src/autocausal/slm.py +856 -0
- auto_causal_lib-0.10.0/src/autocausal/suite_tools.py +1069 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/__init__.py +50 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/action_protocol.py +71 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/autocleanse/__init__.py +44 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/autocleanse/actions.py +364 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/autocleanse/report.py +107 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/autocleanse/suite.py +219 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/autoeda/__init__.py +40 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/autoeda/actions.py +337 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/autoeda/report.py +139 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/autoeda/suite.py +248 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/automine/__init__.py +37 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/automine/actions.py +280 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/automine/report.py +129 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/automine/suite.py +272 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/base.py +72 -0
- auto_causal_lib-0.10.0/src/autocausal/suites/director.py +497 -0
- auto_causal_lib-0.10.0/tests/test_agentic.py +183 -0
- auto_causal_lib-0.10.0/tests/test_behavioral.py +94 -0
- auto_causal_lib-0.10.0/tests/test_csv_discover.py +77 -0
- auto_causal_lib-0.10.0/tests/test_example_datasets.py +90 -0
- auto_causal_lib-0.10.0/tests/test_grail.py +148 -0
- auto_causal_lib-0.10.0/tests/test_guide_ground.py +85 -0
- auto_causal_lib-0.10.0/tests/test_guides.py +263 -0
- auto_causal_lib-0.10.0/tests/test_insight.py +130 -0
- auto_causal_lib-0.10.0/tests/test_isolates_bridge.py +35 -0
- auto_causal_lib-0.10.0/tests/test_mcp_hooks.py +168 -0
- auto_causal_lib-0.10.0/tests/test_mining.py +50 -0
- auto_causal_lib-0.10.0/tests/test_ml_kpi_loop.py +141 -0
- auto_causal_lib-0.10.0/tests/test_nlp.py +89 -0
- auto_causal_lib-0.10.0/tests/test_p1_p3_features.py +251 -0
- auto_causal_lib-0.10.0/tests/test_physics.py +138 -0
- auto_causal_lib-0.10.0/tests/test_physics_demo.py +98 -0
- auto_causal_lib-0.10.0/tests/test_ping.py +43 -0
- auto_causal_lib-0.10.0/tests/test_public_causal.py +112 -0
- auto_causal_lib-0.10.0/tests/test_public_suite.py +133 -0
- auto_causal_lib-0.10.0/tests/test_slm_and_tools.py +147 -0
- auto_causal_lib-0.10.0/tests/test_smoke.py +52 -0
- auto_causal_lib-0.10.0/tests/test_sqlite.py +56 -0
- auto_causal_lib-0.10.0/tests/test_suites.py +191 -0
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: auto-causal-lib
|
|
3
|
+
Version: 0.10.0
|
|
4
|
+
Summary: Auto-impute, SLM-directed AutoCleanse/AutoEDA/AutoMine suites, agentic causal loop (compact+memory), Kineteq GRAIL soft loop, MCP/AgentHook connective tools, mine, discover, public multi-source causal mining, NLTK NLP hints, behavioral science traces, KPI ML loops (SLM→PyTorch), physics predictive loop + Streamlit demo, direction guides, SLM create/infer, tool suite, and ground exploratory causal relationships from CSV and SQL databases.
|
|
5
|
+
Author: AutoCausalLib
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/ehallford11714/auto-causal-lib
|
|
8
|
+
Project-URL: PyPI, https://pypi.org/project/auto-causal-lib/
|
|
9
|
+
Project-URL: Documentation, https://github.com/ehallford11714/auto-causal-lib/blob/master/docs/CONNECTIONS.md
|
|
10
|
+
Keywords: causal,imputation,discovery,sqlalchemy,tabular,mining
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
Requires-Dist: numpy>=1.24
|
|
19
|
+
Requires-Dist: pandas>=2.0
|
|
20
|
+
Requires-Dist: sqlalchemy>=2.0
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
23
|
+
Requires-Dist: pyarrow>=14.0; extra == "dev"
|
|
24
|
+
Provides-Extra: datamine
|
|
25
|
+
Provides-Extra: parquet
|
|
26
|
+
Requires-Dist: pyarrow>=14.0; extra == "parquet"
|
|
27
|
+
Provides-Extra: postgres
|
|
28
|
+
Requires-Dist: psycopg2-binary>=2.9; extra == "postgres"
|
|
29
|
+
Provides-Extra: vertica
|
|
30
|
+
Requires-Dist: vertica-python>=1.3; extra == "vertica"
|
|
31
|
+
Provides-Extra: mysql
|
|
32
|
+
Requires-Dist: pymysql>=1.1; extra == "mysql"
|
|
33
|
+
Provides-Extra: mariadb
|
|
34
|
+
Requires-Dist: pymysql>=1.1; extra == "mariadb"
|
|
35
|
+
Provides-Extra: mssql
|
|
36
|
+
Requires-Dist: pyodbc>=5.0; extra == "mssql"
|
|
37
|
+
Provides-Extra: oracle
|
|
38
|
+
Requires-Dist: oracledb>=2.0; extra == "oracle"
|
|
39
|
+
Provides-Extra: duckdb
|
|
40
|
+
Requires-Dist: duckdb>=0.10; extra == "duckdb"
|
|
41
|
+
Requires-Dist: duckdb-engine>=0.13; extra == "duckdb"
|
|
42
|
+
Provides-Extra: snowflake
|
|
43
|
+
Requires-Dist: snowflake-sqlalchemy>=1.5; extra == "snowflake"
|
|
44
|
+
Provides-Extra: bigquery
|
|
45
|
+
Requires-Dist: sqlalchemy-bigquery>=1.11; extra == "bigquery"
|
|
46
|
+
Provides-Extra: redshift
|
|
47
|
+
Requires-Dist: sqlalchemy-redshift>=0.8; extra == "redshift"
|
|
48
|
+
Requires-Dist: psycopg2-binary>=2.9; extra == "redshift"
|
|
49
|
+
Provides-Extra: cockroachdb
|
|
50
|
+
Requires-Dist: psycopg2-binary>=2.9; extra == "cockroachdb"
|
|
51
|
+
Provides-Extra: trino
|
|
52
|
+
Requires-Dist: trino>=0.328; extra == "trino"
|
|
53
|
+
Provides-Extra: presto
|
|
54
|
+
Requires-Dist: pyhive[presto]>=0.7; extra == "presto"
|
|
55
|
+
Provides-Extra: clickhouse
|
|
56
|
+
Requires-Dist: clickhouse-sqlalchemy>=0.3; extra == "clickhouse"
|
|
57
|
+
Provides-Extra: databricks
|
|
58
|
+
Requires-Dist: databricks-sqlalchemy>=1.0; extra == "databricks"
|
|
59
|
+
Provides-Extra: synapse
|
|
60
|
+
Requires-Dist: pyodbc>=5.0; extra == "synapse"
|
|
61
|
+
Provides-Extra: firebird
|
|
62
|
+
Requires-Dist: sqlalchemy-firebird>=0.8; extra == "firebird"
|
|
63
|
+
Provides-Extra: hana
|
|
64
|
+
Requires-Dist: sqlalchemy-hana>=0.5; extra == "hana"
|
|
65
|
+
Provides-Extra: sqlite
|
|
66
|
+
Provides-Extra: slm
|
|
67
|
+
Requires-Dist: torch>=2.0; extra == "slm"
|
|
68
|
+
Requires-Dist: transformers>=4.36; extra == "slm"
|
|
69
|
+
Provides-Extra: torch
|
|
70
|
+
Requires-Dist: torch>=2.0; extra == "torch"
|
|
71
|
+
Provides-Extra: sklearn
|
|
72
|
+
Requires-Dist: scikit-learn>=1.3; extra == "sklearn"
|
|
73
|
+
Provides-Extra: ml
|
|
74
|
+
Requires-Dist: auto-causal-lib[sklearn,torch]; extra == "ml"
|
|
75
|
+
Provides-Extra: nlp
|
|
76
|
+
Requires-Dist: nltk>=3.8; extra == "nlp"
|
|
77
|
+
Requires-Dist: gensim>=4.3; extra == "nlp"
|
|
78
|
+
Provides-Extra: nlp-full
|
|
79
|
+
Requires-Dist: auto-causal-lib[nlp]; extra == "nlp-full"
|
|
80
|
+
Requires-Dist: spacy>=3.7; extra == "nlp-full"
|
|
81
|
+
Provides-Extra: causal-extra
|
|
82
|
+
Requires-Dist: dowhy>=0.11; extra == "causal-extra"
|
|
83
|
+
Requires-Dist: econml>=0.15; extra == "causal-extra"
|
|
84
|
+
Provides-Extra: web
|
|
85
|
+
Requires-Dist: httpx>=0.27; extra == "web"
|
|
86
|
+
Provides-Extra: ui
|
|
87
|
+
Requires-Dist: streamlit>=1.28; extra == "ui"
|
|
88
|
+
Requires-Dist: plotly>=5.18; extra == "ui"
|
|
89
|
+
Provides-Extra: streamlit
|
|
90
|
+
Requires-Dist: auto-causal-lib[ui]; extra == "streamlit"
|
|
91
|
+
Provides-Extra: suite
|
|
92
|
+
Requires-Dist: auto-causal-lib[ml,nlp,slm,ui,web]; extra == "suite"
|
|
93
|
+
Provides-Extra: mcp
|
|
94
|
+
Requires-Dist: mcp>=1.0; extra == "mcp"
|
|
95
|
+
Provides-Extra: isolates
|
|
96
|
+
Provides-Extra: all-drivers
|
|
97
|
+
Requires-Dist: auto-causal-lib[bigquery,clickhouse,cockroachdb,databricks,duckdb,mariadb,mssql,mysql,oracle,parquet,postgres,presto,redshift,snowflake,synapse,trino,vertica]; extra == "all-drivers"
|
|
98
|
+
Provides-Extra: all
|
|
99
|
+
Requires-Dist: auto-causal-lib[all-drivers,causal-extra,mcp,ml,nlp,parquet,slm,ui,web]; extra == "all"
|
|
100
|
+
|
|
101
|
+

|
|
102
|
+
|
|
103
|
+
# AutoCausalLib (`auto-causal-lib` / `import autocausal`)
|
|
104
|
+
|
|
105
|
+
Automatically **impute** missing tabular fields and discover *exploratory* causal relationships from CSV / Parquet and SQL databases - with optional **SLM-aided creation/inference**, a shared **tool suite**, and a **physics predictive / autocausal loop** for physical insight grounding.
|
|
106
|
+
|
|
107
|
+
> Scope is intentionally small: impute → role inference → PC-lite / score edges → optional IV → optional physics rollout.
|
|
108
|
+
> This is **not** a full AutoML OS and does **not** guarantee causal identification.
|
|
109
|
+
|
|
110
|
+
## Features
|
|
111
|
+
|
|
112
|
+
- Load from CSV, Parquet, or SQLAlchemy URLs (Postgres, Vertica, DuckDB, and more via extras)
|
|
113
|
+
- Auto-imputation (`median_mode`, `knn`, or `auto`) with strategy reporting
|
|
114
|
+
- Role inference (treatment / outcome / instrument / confounder candidates)
|
|
115
|
+
- Exploratory discovery: PC-lite + scored edges + optional 2SLS
|
|
116
|
+
- **Mining** - column profiles, associations, KPI hints
|
|
117
|
+
- **SLM** - `RuleBackend` always; optional HuggingFace for *creation* (questions/Z/morphemes) and *inference* (narrative/caveats)
|
|
118
|
+
- **Direction guides** - soft-optional `LLMIntent` / `retracement` / Kineteq pivot embeddings / **GRAIL** → `DirectionPlan` (see [docs/GUIDES.md](docs/GUIDES.md), [docs/GRAIL.md](docs/GRAIL.md))
|
|
119
|
+
- **GRAIL** (`autocausal.grail`) - embellished Kineteq Generative Reflective Agentic Imputation Loop; live MCP/module when configured, rich offline stub otherwise; MCP tools `autocausal_grail_*`
|
|
120
|
+
- **suite_tools** - registry of causal/NLP/KPI/validation adapters (NLTK, gensim, DoWhy stubs, …)
|
|
121
|
+
- **Physics loop** - analytic KPI dynamics (damped oscillator / drift-diffusion / linear ODE), physical insight grounding, `PhysicsCausalSuite.loop`, optional **Streamlit demo** (`physics ui`)
|
|
122
|
+
- **KPI ML loop** - SLM/Rule `ModelConstructPlan` → median/sklearn/**PyTorch MLP** impute → discover → FitReport ([docs/ML_KPI_LOOP.md](docs/ML_KPI_LOOP.md))
|
|
123
|
+
- **Isolates causal** - soft bridge to IntentIsolates layer motifs → indication vs IV ([docs/LAYER_CAUSAL_IV.md](docs/LAYER_CAUSAL_IV.md))
|
|
124
|
+
- **NLP library** (`autocausal.nlp`) - soft-optional NLTK tokenize/POS/sentiment, `TextCausalHints`, `NlpFeatureBuilder` for apps/notebooks ([docs/NLP_AND_BEHAVIORAL_TRACES.md](docs/NLP_AND_BEHAVIORAL_TRACES.md))
|
|
125
|
+
- **Behavioral traces** (`autocausal.behavioral`) - habit/nudge/reinforcement demos → panel → mine/discover ([docs/NLP_AND_BEHAVIORAL_TRACES.md](docs/NLP_AND_BEHAVIORAL_TRACES.md))
|
|
126
|
+
- **Public causal mining** - multi-source join of bundled/open datasets → mine → discover → report ([docs/PUBLIC_CAUSAL_MINING.md](docs/PUBLIC_CAUSAL_MINING.md))
|
|
127
|
+
- **Insight suite** (`autocausal.insight`) - `InsightReport` + optional SLM; **closed research loop** recommends experiments and mines further (`run_loop` / `ExperimentRecommender`) ([docs/INSIGHT_SUITE.md](docs/INSIGHT_SUITE.md))
|
|
128
|
+
- **Auto suites** (`autocausal.suites`) - **SLM-directed** `AutoCleanseSuite` / `AutoEDASuite` / `AutoMineSuite` with dedicated action modules + `autocausal.skilling` tool surface ([docs/SUITES.md](docs/SUITES.md), [docs/SLM_SKILLING.md](docs/SLM_SKILLING.md))
|
|
129
|
+
- **MCP connective** (`autocausal.mcp` / `autocausal.connective`) - Model Context Protocol stdio server + in-process `AgentHook` so other agents can load/cleanse/mine/discover/report ([docs/MCP.md](docs/MCP.md))
|
|
130
|
+
- **Agentic loop** (`autocausal.agentic`) - SLM-guided cyclic FSM: hypothesize → skill → validate → compact → persist → route, with MEM1-inspired memory + ACON-inspired compaction ([docs/AGENTIC_LOOP.md](docs/AGENTIC_LOOP.md))
|
|
131
|
+
- **Fabric contracts** - `to_mine_report` / `to_causal_edges` / `to_fabric_bundle` / `to_search_dag` aligned with shared Causal Fabric schemas ([docs/LIBRARY_API.md](docs/LIBRARY_API.md))
|
|
132
|
+
- **Discovery stability & ensemble** - bootstrap per-edge stability (honest confidence); multi-method consensus (`pc_lite` + `corr_skeleton` + `mi_stub`)
|
|
133
|
+
- **QC gate** - `autocausal.qc.validate_frame` before discover (ID leakage / bad keys)
|
|
134
|
+
- **Panel / join / IV handoff** - `PanelSpec`, `join.align`, `to_causaliv_request`, sensitivity + soft refute hooks
|
|
135
|
+
- Markdown / JSON reports and a CLI
|
|
136
|
+
|
|
137
|
+
## Install
|
|
138
|
+
|
|
139
|
+
From [PyPI](https://pypi.org/project/auto-causal-lib/):
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
pip install auto-causal-lib
|
|
143
|
+
pip install "auto-causal-lib[all]" # nlp + slm + mcp + ui + ml + causal-extra + web + drivers
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Optional extras (soft deps; core works without them):
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
pip install "auto-causal-lib[nlp]" # nltk + gensim
|
|
150
|
+
pip install "auto-causal-lib[slm]" # torch + transformers (lazy load)
|
|
151
|
+
pip install "auto-causal-lib[mcp]" # MCP stdio server for other agents
|
|
152
|
+
pip install "auto-causal-lib[ui]" # Streamlit physics demo (+ plotly)
|
|
153
|
+
pip install "auto-causal-lib[ml]" # torch + scikit-learn
|
|
154
|
+
pip install "auto-causal-lib[causal-extra]" # DoWhy / EconML
|
|
155
|
+
pip install "auto-causal-lib[postgres]" # and other DB drivers - see docs/CONNECTIONS.md
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
From source (development):
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
cd research/AutoCausalLib
|
|
162
|
+
pip install -e ".[dev]"
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Env:
|
|
166
|
+
|
|
167
|
+
| Variable | Effect |
|
|
168
|
+
|----------|--------|
|
|
169
|
+
| `AUTOCAUSAL_SLM=1` | Prefer HuggingFace SLM |
|
|
170
|
+
| `AUTOCAUSAL_SLM_MODEL` | Model id (default `sshleifer/tiny-gpt2` for tests) |
|
|
171
|
+
| `AUTOCAUSAL_TORCH=1` | Prefer PyTorch MLP imputer/predictor when installed |
|
|
172
|
+
| `AUTOCAUSAL_TORCH_TEST=1` | Enable gated torch unit tests |
|
|
173
|
+
| `AUTOCAUSAL_LLMINTENT_MODEL` | Optional LLMIntent heavy analyzer model |
|
|
174
|
+
| `AUTOCAUSAL_KINETEQ_MCP=1` + `KINETEQ_MCP_URL` | Live Kineteq MCP pivot embeddings / GRAIL |
|
|
175
|
+
| `AUTOCAUSAL_GRAIL_MCP=1` | Also enables live GRAIL MCP calls |
|
|
176
|
+
|
|
177
|
+
Better instruct SLMs (document only): `Qwen/Qwen2.5-0.5B-Instruct`, `HuggingFaceTB/SmolLM2-360M-Instruct`, `microsoft/Phi-3-mini-4k-instruct`.
|
|
178
|
+
|
|
179
|
+
Core deps: `numpy`, `pandas`, `sqlalchemy`. See [docs/CONNECTIONS.md](docs/CONNECTIONS.md). Optional path deps: `pip install -e ../LLMIntent`.
|
|
180
|
+
|
|
181
|
+
## Quick start
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
from autocausal import AutoCausal
|
|
185
|
+
|
|
186
|
+
ac = AutoCausal.from_csv("data.csv")
|
|
187
|
+
result = ac.run() # impute + discover
|
|
188
|
+
print(ac.report()) # markdown
|
|
189
|
+
print(result.to_json()) # graph + edges + candidates
|
|
190
|
+
|
|
191
|
+
# 0.8: stability, QC, fabric, NLP→guide
|
|
192
|
+
ac.enrich_from_text("Does spend cause sales?")
|
|
193
|
+
result = ac.discover(stability=True, bootstrap_n=12, ensemble=True)
|
|
194
|
+
print(ac.to_fabric_bundle()["schema"]) # FabricBundle.v1
|
|
195
|
+
print(ac.to_causaliv_request()["schema"])
|
|
196
|
+
|
|
197
|
+
# SLM/rule creation + inference
|
|
198
|
+
print(ac.create(text="Does spend cause sales?").to_markdown())
|
|
199
|
+
print(ac.interpret().to_markdown())
|
|
200
|
+
|
|
201
|
+
# Tool suite validation
|
|
202
|
+
print(ac.validate_tools(y="y", d="d", z="z").to_markdown())
|
|
203
|
+
|
|
204
|
+
# Direction steering (LLMIntent / retracement / Kineteq pivots / GRAIL - soft-optional)
|
|
205
|
+
plan = ac.direct(
|
|
206
|
+
text="Does spend cause revenue?",
|
|
207
|
+
backends=["llmintent", "retracement", "kineteq_pivot", "grail", "rule"],
|
|
208
|
+
)
|
|
209
|
+
print(plan.to_markdown())
|
|
210
|
+
|
|
211
|
+
# GRAIL reflective loop (offline stub unless Kineteq MCP configured)
|
|
212
|
+
from autocausal.grail import GrailEngine
|
|
213
|
+
report = GrailEngine().run("Does spend cause revenue?", context={"text": "Does spend cause revenue?"})
|
|
214
|
+
print(report.to_markdown())
|
|
215
|
+
|
|
216
|
+
# Physics predictive / autocausal loop
|
|
217
|
+
from autocausal.physics import PhysicsCausalSuite
|
|
218
|
+
|
|
219
|
+
suite = PhysicsCausalSuite.from_csv("data.csv")
|
|
220
|
+
phys = suite.loop(horizon=5, text="what drives outcome?")
|
|
221
|
+
print(phys.to_markdown())
|
|
222
|
+
# Or: ac.physics_loop(horizon=5) / AutoCausal.auto(..., physics=True)
|
|
223
|
+
|
|
224
|
+
# KPI-mined ML loop (SLM/Rule constructs torch vs median imputer)
|
|
225
|
+
from autocausal.ml import KPIMinedCausalLoop
|
|
226
|
+
|
|
227
|
+
ml = KPIMinedCausalLoop.from_csv("data.csv").run(
|
|
228
|
+
text="what drives Y?", use_slm=False, use_torch=True, horizon=5
|
|
229
|
+
)
|
|
230
|
+
print(ml.plan.to_markdown())
|
|
231
|
+
print(ml.fit.to_markdown())
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Real dataset examples (offline)
|
|
235
|
+
|
|
236
|
+
Bundled Iris, Wine, Titanic, Gapminder subset, Diabetes, and California housing sample - no network required. Licenses/attribution: [DATASETS.md](DATASETS.md). Full walkthrough: [docs/EXAMPLES.md](docs/EXAMPLES.md).
|
|
237
|
+
|
|
238
|
+
```python
|
|
239
|
+
from autocausal import AutoCausal, load_dataset
|
|
240
|
+
|
|
241
|
+
df = load_dataset("iris") # Fisher Iris CSV from package data
|
|
242
|
+
ac = AutoCausal(df)
|
|
243
|
+
ac.mine().impute().discover(use_iv=False, min_abs_corr=0.2)
|
|
244
|
+
print(ac.report()) # exploratory edges - not scientific flower-causation claims
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
python examples/iris_causal.py
|
|
249
|
+
python examples/iris_causal.py --insight
|
|
250
|
+
python examples/multi_dataset_tour.py
|
|
251
|
+
python -m autocausal public load iris
|
|
252
|
+
python -m autocausal insight demo --dataset iris --no-slm
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### NLP hints & behavioral traces (library-first)
|
|
256
|
+
|
|
257
|
+
These are **importable modules** for apps and notebooks - the CLI is optional.
|
|
258
|
+
|
|
259
|
+
```python
|
|
260
|
+
from autocausal.nlp import extract_causal_hints_from_text, NlpFeatureBuilder
|
|
261
|
+
from autocausal.behavioral import BehavioralTraceStore, mine_behavioral_traces
|
|
262
|
+
|
|
263
|
+
hints = extract_causal_hints_from_text(
|
|
264
|
+
"Randomized treatment leads to higher revenue, associated with age."
|
|
265
|
+
)
|
|
266
|
+
print(hints.roles.to_dict()) # treatment / outcome / confounder / instrument cues
|
|
267
|
+
print(hints.to_guide_context()) # feed guide/discover
|
|
268
|
+
|
|
269
|
+
features = NlpFeatureBuilder().transform(["because spend increases sales"])
|
|
270
|
+
|
|
271
|
+
result = mine_behavioral_traces("habit_loop", discover=True)
|
|
272
|
+
print(result.report.to_markdown()) # hypothesized stimulus→response / habit→outcome edges
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
See [docs/NLP_AND_BEHAVIORAL_TRACES.md](docs/NLP_AND_BEHAVIORAL_TRACES.md) (Python API first, CLI secondary).
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
### Public causal mining (library-first)
|
|
279
|
+
|
|
280
|
+
Join bundled/open demo sources, mine associations, and run exploratory discovery:
|
|
281
|
+
|
|
282
|
+
```python
|
|
283
|
+
from autocausal import AutoCausal, PublicCausalMiner, mine_public
|
|
284
|
+
|
|
285
|
+
report = AutoCausal.mine_public(
|
|
286
|
+
["finance_demo", "demographics_demo", "health_demo"],
|
|
287
|
+
join_on="region",
|
|
288
|
+
discover=True,
|
|
289
|
+
use_iv=True,
|
|
290
|
+
)
|
|
291
|
+
print(report.to_markdown())
|
|
292
|
+
|
|
293
|
+
# Explicit miner
|
|
294
|
+
miner = PublicCausalMiner(["marketing_demo", "instruments_demo", "demographics_demo"])
|
|
295
|
+
report = miner.run(discover=True, validate=True)
|
|
296
|
+
|
|
297
|
+
# Convenience
|
|
298
|
+
report = mine_public(["finance_demo", "climate_demo"], discover=True)
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
python -m autocausal public list --offline
|
|
303
|
+
python -m autocausal public mine --sources finance_demo,demographics_demo --discover
|
|
304
|
+
python -m autocausal public causal --sources finance_demo,demographics_demo,health_demo -o report.md
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
See [docs/PUBLIC_CAUSAL_MINING.md](docs/PUBLIC_CAUSAL_MINING.md).
|
|
308
|
+
|
|
309
|
+
### Auto suites - Cleanse / EDA / Mine (SLM-directed)
|
|
310
|
+
|
|
311
|
+
Every **auto\*** path is directed by `SLMAutoDirector` when available; rules always work offline.
|
|
312
|
+
|
|
313
|
+
```python
|
|
314
|
+
from autocausal import AutoCausal, AutoCleanseSuite, AutoEDASuite, AutoMineSuite
|
|
315
|
+
|
|
316
|
+
clean = AutoCleanseSuite(df, use_slm=True).run()
|
|
317
|
+
eda = AutoEDASuite(clean.frame, use_slm=True).run()
|
|
318
|
+
mine = AutoMineSuite(clean.frame, use_slm=True).run()
|
|
319
|
+
|
|
320
|
+
ac = AutoCausal.from_dataframe(df).cleanse().eda().automine().discover()
|
|
321
|
+
# or: AutoCausal.auto("data.csv", use_slm=True, cleanse=True)
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
python -m autocausal suite cleanse --csv data.csv --no-slm -o cleanse.md
|
|
326
|
+
python -m autocausal suite eda --csv data.csv -o eda.md
|
|
327
|
+
python -m autocausal suite mine --csv data.csv --format json -o mine.json
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
See [docs/SUITES.md](docs/SUITES.md) and [docs/SLM_SKILLING.md](docs/SLM_SKILLING.md).
|
|
331
|
+
|
|
332
|
+
### Agentic causal loop (library-first)
|
|
333
|
+
|
|
334
|
+
SLM-guided cyclic research loop with compaction + constant-budget memory (SOTA-inspired APIs - not paper clones):
|
|
335
|
+
|
|
336
|
+
```python
|
|
337
|
+
from autocausal import AutoCausal, load_dataset
|
|
338
|
+
from autocausal.agentic import AgenticCausalLoop, run_agentic_loop
|
|
339
|
+
|
|
340
|
+
df = load_dataset("iris")
|
|
341
|
+
report = run_agentic_loop(df, text="petal drivers", max_rounds=2, use_slm=False)
|
|
342
|
+
print(report.to_markdown())
|
|
343
|
+
|
|
344
|
+
# Or: AutoCausal(...).agentic_loop(...) / MCP tool autocausal_agentic_loop
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
See [docs/AGENTIC_LOOP.md](docs/AGENTIC_LOOP.md).
|
|
348
|
+
|
|
349
|
+
### Use from other agents (MCP)
|
|
350
|
+
|
|
351
|
+
Expose AutoCausal as MCP tools for Cursor, Claude Desktop, and other MCP clients - or call the same surface in-process via `AgentHook` (no `mcp` SDK required).
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
pip install -e ".[mcp]"
|
|
355
|
+
python -m autocausal.mcp # stdio server
|
|
356
|
+
# or: autocausal-mcp
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
Cursor / Claude Desktop stdio config:
|
|
360
|
+
|
|
361
|
+
```json
|
|
362
|
+
{
|
|
363
|
+
"mcpServers": {
|
|
364
|
+
"autocausal": {
|
|
365
|
+
"command": "python",
|
|
366
|
+
"args": ["-m", "autocausal.mcp"],
|
|
367
|
+
"env": { "PYTHONUNBUFFERED": "1" }
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
Library-first (scripts / non-MCP agents):
|
|
374
|
+
|
|
375
|
+
```python
|
|
376
|
+
from autocausal.connective import AgentHook
|
|
377
|
+
|
|
378
|
+
hook = AgentHook()
|
|
379
|
+
hook.call_tool("autocausal_load_dataset", {"dataset_id": "iris"})
|
|
380
|
+
hook.call_tool("autocausal_discover", {"use_iv": False})
|
|
381
|
+
print(hook.call_tool("autocausal_report", {"format": "markdown"})["markdown"][:400])
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
Tools include `autocausal_load_dataset`, `autocausal_from_csv`, `autocausal_cleanse` / `eda` / `mine`, `autocausal_discover`, `autocausal_insight_loop`, `autocausal_recommend_experiments`, `autocausal_public_mine`, `autocausal_report`, `autocausal_list_datasets`, `autocausal_skilling_list`. Soft-fail if optional suites are missing. Full setup: [docs/MCP.md](docs/MCP.md).
|
|
385
|
+
|
|
386
|
+
### Insight suite (library-first)
|
|
387
|
+
|
|
388
|
+
```python
|
|
389
|
+
from autocausal.insight import InsightSuite, ExperimentRecommender, run_insight_loop, demo_insight
|
|
390
|
+
|
|
391
|
+
report = run_insight_loop("data.csv", text="what drives revenue?", use_slm=False)
|
|
392
|
+
report.write("insight.md")
|
|
393
|
+
|
|
394
|
+
# Closed loop: mine → guide/SLM → recommend experiments → join/remine → rediscover
|
|
395
|
+
suite = InsightSuite(use_slm=False)
|
|
396
|
+
report = suite.run_loop(
|
|
397
|
+
"data.csv", max_rounds=3, join_sources=["demographics_demo", "instruments_demo"]
|
|
398
|
+
)
|
|
399
|
+
print(report.experiments_recommended[:3])
|
|
400
|
+
print(report.round_history)
|
|
401
|
+
|
|
402
|
+
# From a pre-built AutoCausal
|
|
403
|
+
from autocausal import AutoCausal
|
|
404
|
+
ac = AutoCausal.from_csv("data.csv")
|
|
405
|
+
report = InsightSuite.from_autocausal(ac).run(use_slm=False)
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
```bash
|
|
409
|
+
python -m autocausal insight run --csv data.csv --no-slm -o report.md
|
|
410
|
+
python -m autocausal insight loop --csv data.csv --rounds 3 --no-slm -o loop.md
|
|
411
|
+
python -m autocausal insight demo
|
|
412
|
+
python -m autocausal insight demo --dataset iris --no-slm
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
See [docs/INSIGHT_SUITE.md](docs/INSIGHT_SUITE.md) and [docs/EXAMPLES.md](docs/EXAMPLES.md).
|
|
416
|
+
|
|
417
|
+
### Guiding direction with LLMIntent / Retracement / Kineteq pivots / GRAIL
|
|
418
|
+
|
|
419
|
+
Backends are **soft-optional**: missing packages soft-fail to stubs/fallbacks and never break core discovery.
|
|
420
|
+
|
|
421
|
+
```bash
|
|
422
|
+
python -m autocausal guides list
|
|
423
|
+
python -m autocausal auto --csv data.csv --text "what causes revenue?" \
|
|
424
|
+
--guides llmintent,retracement,kineteq_pivot,grail
|
|
425
|
+
python -m autocausal direct --csv data.csv --text "..." --guides grail,rule
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
See [docs/GUIDES.md](docs/GUIDES.md) and [docs/GRAIL.md](docs/GRAIL.md).
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
python -m autocausal discover --csv data.csv
|
|
432
|
+
python -m autocausal create --csv data.csv --text "lottery assignment"
|
|
433
|
+
python -m autocausal infer --csv data.csv
|
|
434
|
+
python -m autocausal tools list
|
|
435
|
+
python -m autocausal tools validate --csv data.csv --y y --d d --z z
|
|
436
|
+
python -m autocausal physics loop --csv data.csv --horizon 5 --text "what drives outcome?"
|
|
437
|
+
python -m autocausal physics rollout --csv data.csv --horizon 5
|
|
438
|
+
python -m autocausal physics ui --port 8518
|
|
439
|
+
python -m autocausal auto --csv data.csv --physics --horizon 5
|
|
440
|
+
python -m autocausal ml loop --csv data.csv --text "what drives Y?"
|
|
441
|
+
python -m autocausal ml loop --csv data.csv --torch --guides rule
|
|
442
|
+
python -m autocausal ml fit-imputer --csv data.csv --backend median
|
|
443
|
+
python -m autocausal nlp extract --text "treatment leads to revenue"
|
|
444
|
+
python -m autocausal behavioral list
|
|
445
|
+
python -m autocausal behavioral mine --demo habit_loop --discover
|
|
446
|
+
python -m autocausal public list --offline
|
|
447
|
+
python -m autocausal public mine --sources finance_demo,demographics_demo --discover
|
|
448
|
+
python -m autocausal public causal --sources finance_demo,demographics_demo,health_demo -o report.md
|
|
449
|
+
python -m autocausal slm-status
|
|
450
|
+
python -m autocausal guides list
|
|
451
|
+
python -m autocausal auto --csv data.csv --slm
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
### Physics Streamlit demo
|
|
455
|
+
|
|
456
|
+
Interactive UI for the physics autocausal loop (trajectory charts, edges, physical insights, energy proxies). Soft-optional - core mine/discover/ml loops do not import Streamlit.
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
pip install -e ".[ui]"
|
|
460
|
+
python -m autocausal physics ui --port 8518
|
|
461
|
+
# or: streamlit run src/autocausal/apps/physics_streamlit.py --server.port 8518
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
See [docs/PHYSICS_DEMO.md](docs/PHYSICS_DEMO.md). **Caveat:** exploratory dynamics only - not true physics ID.
|
|
465
|
+
|
|
466
|
+
### PostgreSQL
|
|
467
|
+
|
|
468
|
+
```bash
|
|
469
|
+
pip install -e ".[postgres]"
|
|
470
|
+
python -m autocausal discover \
|
|
471
|
+
--db "postgresql+psycopg2://user:pass@localhost:5432/mydb" \
|
|
472
|
+
--table events
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
## Epistemic caveats
|
|
477
|
+
|
|
478
|
+
AutoCausalLib is an **exploratory** toolkit. Please read these before treating outputs as science:
|
|
479
|
+
|
|
480
|
+
- **Discovery ≠ identification.** PC-lite / scored edges are *candidate* relationships, not proven causal effects.
|
|
481
|
+
- **Imputation and joins change the sample.** Missing-data fills and multi-source joins can invent associations (including ecological fallacy on region aggregates).
|
|
482
|
+
- **SLM text is assistance only.** Narratives, experiment suggestions, and role hints from rules/HF models are generative - not statistical proof.
|
|
483
|
+
- **IV / 2SLS paths are soft.** Optional instruments need human design review (relevance, exclusion); lite F-stats are not a substitute.
|
|
484
|
+
- **Bundled public/behavioral tables** include MIT synthetic fixtures *and* real educational CSVs (Iris, etc.) - see [DATASETS.md](DATASETS.md). Exploratory edges on Iris are illustrative, not flower-causation science.
|
|
485
|
+
- **Physics / KPI loops** are predictive rollouts and grounding aids - not true physical or causal identification.
|
|
486
|
+
|
|
487
|
+
Reports (InsightReport, PublicCausalReport, markdown CLI output) repeat these caveats; keep them in downstream apps.
|
|
488
|
+
|
|
489
|
+
## Docs
|
|
490
|
+
|
|
491
|
+
- [Library API map (0.8+)](docs/LIBRARY_API.md)
|
|
492
|
+
- [Roadmap (P1-P3 shipped)](docs/ROADMAP.md)
|
|
493
|
+
- [Examples (Iris + real datasets)](docs/EXAMPLES.md)
|
|
494
|
+
- [Dataset licenses & paths](DATASETS.md)
|
|
495
|
+
- [Insight suite (library API + optional SLM)](docs/INSIGHT_SUITE.md)
|
|
496
|
+
- [Auto suites - Cleanse / EDA / Mine (SLM-directed)](docs/SUITES.md)
|
|
497
|
+
- [SLM skilling / tool surface](docs/SLM_SKILLING.md)
|
|
498
|
+
- [MCP connective (agents / Cursor / Claude)](docs/MCP.md)
|
|
499
|
+
- [Agentic causal loop (compact + memory)](docs/AGENTIC_LOOP.md)
|
|
500
|
+
- [Public causal mining (multi-source join)](docs/PUBLIC_CAUSAL_MINING.md)
|
|
501
|
+
- [NLP & behavioral traces (library API)](docs/NLP_AND_BEHAVIORAL_TRACES.md)
|
|
502
|
+
- [KPI ML loop (SLM → PyTorch)](docs/ML_KPI_LOOP.md)
|
|
503
|
+
- [ML Model Hub proposals](../docs/AUTOCAUSAL_ML_MODEL_HUB_PROPOSALS.md)
|
|
504
|
+
- [Physics Streamlit demo](docs/PHYSICS_DEMO.md)
|
|
505
|
+
- [Physics world models + autocausal loop (SOTA)](docs/SOTA_PHYSICS_WORLD_MODEL_AUTOCAUSAL.md)
|
|
506
|
+
- [Direction guides](docs/GUIDES.md)
|
|
507
|
+
- [GRAIL (Kineteq adaptation)](docs/GRAIL.md)
|
|
508
|
+
- [Tool suite registry](docs/SUITE_TOOLS.md)
|
|
509
|
+
- [Connection matrix & pip extras](docs/CONNECTIONS.md)
|
|
510
|
+
- [SOTA context (PC / GES / NOTEARS, imputation)](docs/SOTA.md)
|
|
511
|
+
|
|
512
|
+
## Related suite
|
|
513
|
+
|
|
514
|
+
| Project | Role |
|
|
515
|
+
|---------|------|
|
|
516
|
+
| [EmotiveVision](https://github.com/ehallford11714/emotivevision) | Emotion/intent streams → autocausal frames |
|
|
517
|
+
| [CausalIVSuite](https://github.com/ehallford11714/causal-iv-suite) | IV / DiD / AutoML causal suite |
|
|
518
|
+
| [CausalSearch](https://github.com/ehallford11714/causal-search) | Causal evidence search & DAG infill |
|
|
519
|
+
| [CausalBridge](https://github.com/ehallford11714/causal-bridge) | Control plane (status shows SLM/tools) |
|
|
520
|
+
| [NextFrameSeq](https://github.com/ehallford11714/next-frame-seq) | Vision / next-frame prediction |
|
|
521
|
+
|
|
522
|
+
## License
|
|
523
|
+
|
|
524
|
+
MIT
|