universal-log-ts 7.6.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.
- universal_log_ts-7.6.0/LICENSE +21 -0
- universal_log_ts-7.6.0/PKG-INFO +289 -0
- universal_log_ts-7.6.0/README.md +251 -0
- universal_log_ts-7.6.0/pyproject.toml +67 -0
- universal_log_ts-7.6.0/setup.cfg +4 -0
- universal_log_ts-7.6.0/tests/test_basic_functions.py +107 -0
- universal_log_ts-7.6.0/tests/test_cli_and_diagnostics.py +275 -0
- universal_log_ts-7.6.0/tests/test_deseasonal_and_html.py +230 -0
- universal_log_ts-7.6.0/tests/test_universal_log.py +130 -0
- universal_log_ts-7.6.0/tests/test_voie1_calibrated.py +82 -0
- universal_log_ts-7.6.0/universal_log/__init__.py +30 -0
- universal_log_ts-7.6.0/universal_log/__main__.py +7 -0
- universal_log_ts-7.6.0/universal_log/cli.py +156 -0
- universal_log_ts-7.6.0/universal_log/config.py +106 -0
- universal_log_ts-7.6.0/universal_log/data.py +182 -0
- universal_log_ts-7.6.0/universal_log/detection.py +861 -0
- universal_log_ts-7.6.0/universal_log/diagnostics.py +342 -0
- universal_log_ts-7.6.0/universal_log/estimators.py +984 -0
- universal_log_ts-7.6.0/universal_log/falsification.py +970 -0
- universal_log_ts-7.6.0/universal_log/levels.py +526 -0
- universal_log_ts-7.6.0/universal_log/pipeline.py +883 -0
- universal_log_ts-7.6.0/universal_log/prediction.py +196 -0
- universal_log_ts-7.6.0/universal_log/regression.py +181 -0
- universal_log_ts-7.6.0/universal_log/report_html.py +727 -0
- universal_log_ts-7.6.0/universal_log/stats.py +140 -0
- universal_log_ts-7.6.0/universal_log_ts.egg-info/PKG-INFO +289 -0
- universal_log_ts-7.6.0/universal_log_ts.egg-info/SOURCES.txt +29 -0
- universal_log_ts-7.6.0/universal_log_ts.egg-info/dependency_links.txt +1 -0
- universal_log_ts-7.6.0/universal_log_ts.egg-info/entry_points.txt +2 -0
- universal_log_ts-7.6.0/universal_log_ts.egg-info/requires.txt +17 -0
- universal_log_ts-7.6.0/universal_log_ts.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 UNIVERSAL_LOG Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: universal-log-ts
|
|
3
|
+
Version: 7.6.0
|
|
4
|
+
Summary: UNIVERSAL_LOG — Domain-agnostic threshold detection, multi-channel structural breaks, and falsification
|
|
5
|
+
Author: Zackary Drasse-Ménard (FindPrint)
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://findprint.github.io/2026-11-28/
|
|
8
|
+
Project-URL: Repository, https://github.com/FindPrint/2026-11-28
|
|
9
|
+
Project-URL: Documentation, https://github.com/FindPrint/2026-11-28/blob/main/LIVRE_BLANC.md
|
|
10
|
+
Project-URL: Issues, https://github.com/FindPrint/2026-11-28/issues
|
|
11
|
+
Keywords: threshold-detection,time-series,change-point,falsification,persistent-homology,complexity
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: numpy>=1.20.0
|
|
24
|
+
Requires-Dist: pandas>=1.3.0
|
|
25
|
+
Requires-Dist: scipy>=1.7.0
|
|
26
|
+
Provides-Extra: viz
|
|
27
|
+
Requires-Dist: matplotlib>=3.6.0; extra == "viz"
|
|
28
|
+
Requires-Dist: seaborn>=0.12.0; extra == "viz"
|
|
29
|
+
Provides-Extra: full
|
|
30
|
+
Requires-Dist: ripser>=0.6.0; extra == "full"
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
33
|
+
Requires-Dist: pytest-cov>=3.0.0; extra == "dev"
|
|
34
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
35
|
+
Requires-Dist: matplotlib>=3.6.0; extra == "dev"
|
|
36
|
+
Requires-Dist: seaborn>=0.12.0; extra == "dev"
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
|
|
39
|
+
# UNIVERSAL_LOG (v7.6.0)
|
|
40
|
+
|
|
41
|
+
[](https://github.com/FindPrint/2026-11-28/actions/workflows/ci.yml)
|
|
42
|
+
[](https://github.com/FindPrint/2026-11-28/releases/tag/v7.6.0)
|
|
43
|
+
[](https://www.python.org/)
|
|
44
|
+
[](LICENSE)
|
|
45
|
+
[](https://colab.research.google.com/github/FindPrint/2026-11-28/blob/main/monoliths/UNIVERSAL_LOG_v7.6.0_universal.ipynb)
|
|
46
|
+
[](https://findprint.github.io/2026-11-28/)
|
|
47
|
+
|
|
48
|
+
**Domain-agnostic structural threshold detection and falsification for time series and multidimensional systems.**
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Overview
|
|
53
|
+
|
|
54
|
+
`UNIVERSAL_LOG` is a statistical instrument for detecting regime changes, abrupt jumps, slope breaks, and structural phase transitions without domain priors. It combines vectorized sliding-window effect sizes, multi-channel structural detectors, permutation-based and AR(1) falsification suites, walk-forward validation, and 29 complexity/topological estimators organized across levels **L1–L7**.
|
|
55
|
+
|
|
56
|
+
### Core Design Principles (v7)
|
|
57
|
+
|
|
58
|
+
- **P1 — Zero domain priors:** No domain names, domain lexicons, or domain-tuned heuristics in code.
|
|
59
|
+
- **P2 — No hand-tuned weights:** Inverse-variance stability weighting (`1 / (1 + CV)`), or equal weights.
|
|
60
|
+
- **P3 — Name-invariant direction:** Direction equals the empirical sign of Cohen's *d* (verified at runtime by column-rename invariance tests).
|
|
61
|
+
- **P4 — No harmonic prior:** Uniform Monte Carlo and permutation nulls; harmonic jitter is an optional comparative ablation only.
|
|
62
|
+
- **P5 — Falsification first:** Every threshold faces permutation-corrected scans, white-noise nulls, shuffled-target nulls, AR(1) surrogate nulls, split-half checks, multi-window stability, and walk-forward validation.
|
|
63
|
+
- **P6 — Effect + CI + *p*:** Never a bare score alone.
|
|
64
|
+
- **P7 — Full reproducibility:** Fixed seeds, input/code metadata, SHA-256 hashes, and deterministic outputs.
|
|
65
|
+
- **P8 — Calibrated diagnostic ($T_{\log}$):** $T_{\log}$ is explicitly calibrated against its temporal permutation null and serves strictly as a diagnostic, never as proof.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Installation
|
|
70
|
+
|
|
71
|
+
### Requirements
|
|
72
|
+
|
|
73
|
+
- Python 3.10+
|
|
74
|
+
- `numpy`, `pandas`, `scipy` (core)
|
|
75
|
+
- `matplotlib`, `seaborn` (visualization)
|
|
76
|
+
- `pytest`, `pytest-cov` (testing)
|
|
77
|
+
- `ripser` (optional, for Vietoris-Rips `PersistentHomology`; autonomous `H0_UnionFind` fallback built-in since v7.6.0)
|
|
78
|
+
|
|
79
|
+
### Editable / Local Install
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Install from PyPI (import name: universal_log)
|
|
83
|
+
pip install universal-log-ts
|
|
84
|
+
|
|
85
|
+
# Or editable local install from source
|
|
86
|
+
pip install -r requirements.txt
|
|
87
|
+
pip install -e ".[dev]"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
With optional persistent homology support:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
pip install -e ".[dev,full]"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Project Structure
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
11-27-2026/
|
|
102
|
+
├── LIVRE_BLANC.md # Master living whitepaper ("monolithe pour tous", auto-synced)
|
|
103
|
+
├── universal_log/ # Voie 3 (canonical): modular Python package (v7.6.0)
|
|
104
|
+
│ ├── __init__.py # Public API exports (13 symbols)
|
|
105
|
+
│ ├── __main__.py # Entry point for `python -m universal_log`
|
|
106
|
+
│ ├── cli.py # CLI argument parser & --describe-limits
|
|
107
|
+
│ ├── config.py # UniversalConfig & mode presets
|
|
108
|
+
│ ├── data.py # UniversalDataset loader & synthetic demos
|
|
109
|
+
│ ├── stats.py # Cohen's d, bootstrap CI, permutation tests
|
|
110
|
+
│ ├── estimators.py # 29 complexity estimators (incl. autonomous H0_UnionFind) + calibrated T_log
|
|
111
|
+
│ ├── detection.py # Vectorized scans, 5 structural channels, cascade
|
|
112
|
+
│ ├── falsification.py # Falsification suite, AR(1)/ARIMA(1,1,0)/vol_arima_0_1_0, walk-forward, grading
|
|
113
|
+
│ ├── diagnostics.py # Optional segmented MC + Step 1-4 suite
|
|
114
|
+
│ ├── levels.py # L1..L7 universal structural diagnostics
|
|
115
|
+
│ ├── prediction.py # Locked cross-study motif prediction
|
|
116
|
+
│ ├── pipeline.py # analyze() orchestration & exports
|
|
117
|
+
│ ├── report_html.py # Self-contained offline HTML5/SVG report renderer
|
|
118
|
+
│ └── regression.py # Built-in non-regression self-tests
|
|
119
|
+
├── tracks/ # The analytical tracks (Voie 1, Voie 1.1, Voie 2, Voie 3 pointer)
|
|
120
|
+
│ ├── README.md # Comparative guide & CLI invocation for all tracks
|
|
121
|
+
│ ├── voie_1_holographique_v6.5.0/ # Voie 1: holographic 2-layer T_log, 3-anchor triangulation, CSD, L1-L7a/b
|
|
122
|
+
│ ├── voie_1_holographique_v6.6.0/ # Voie 1.1: calibrated double-null holographic track (30-60x faster, H0_UnionFind)
|
|
123
|
+
│ ├── voie_2_socle_p1_p8_v7.1.5/ # Voie 2: minimalist P1-P8 single-channel baseline + 3-cohort MC
|
|
124
|
+
│ └── voie_3_instrument_calibre_v7.6.0/ # Pointer to universal_log/ & monoliths/
|
|
125
|
+
├── monoliths/ # Generated single-file Voie 3 monoliths (.py & .ipynb, v7.6.0)
|
|
126
|
+
├── theory/ # Theoretical T_log corpus (original concept + calibrated v7.4/v7.5)
|
|
127
|
+
├── docs/ # Technical, testing, real-data, and canonical T_log spec
|
|
128
|
+
├── tools/ # Monolith builders, SHA-256 manifest, whitepaper sync, track comparator
|
|
129
|
+
├── UNIVERSAL_LOG_v7.1.5_universal.py # Backward-compatible CLI/import shim (delegates to v7.6.0)
|
|
130
|
+
├── datasets/ # 9 synthetic benchmark CSVs + metadata
|
|
131
|
+
├── datasets_real/ # 19 real non-synthetic empirical CSVs (+ occupancy) + metadata
|
|
132
|
+
├── datasets_holdout*/ # 6 chronological SHA-256 blind holdout cohorts (R, v731, v732, v740, v750, v760)
|
|
133
|
+
├── tests/ # Unit tests (37), SOTA benchmark, H0 IAAFT replication, holdout/showcase, ablation, viz
|
|
134
|
+
├── notebooks/exploration.ipynb # Interactive Jupyter exploration notebook
|
|
135
|
+
├── .github/workflows/ci.yml # Automated CI/CD pipeline
|
|
136
|
+
├── MANIFEST.sha256 # Complete SHA-256 provenance manifest
|
|
137
|
+
├── pyproject.toml # Package configuration
|
|
138
|
+
├── pytest.ini # Pytest configuration
|
|
139
|
+
├── requirements.txt # Python dependencies
|
|
140
|
+
└── LICENSE # MIT License
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Usage
|
|
146
|
+
|
|
147
|
+
### Command Line
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Analyze a CSV / Parquet / JSON dataset
|
|
151
|
+
python -m universal_log --input datasets/demo_step.csv --mode fast --output results/demo_step
|
|
152
|
+
|
|
153
|
+
# Or via installed console script (after `pip install -e .`)
|
|
154
|
+
universal-log --input datasets/demo_step.csv --mode robust
|
|
155
|
+
|
|
156
|
+
# Specify explicit control and target columns
|
|
157
|
+
python -m universal_log --input data.csv --control time --target signal_1
|
|
158
|
+
|
|
159
|
+
# Run synthetic built-in demos
|
|
160
|
+
python -m universal_log --demo step
|
|
161
|
+
python -m universal_log --demo logistic
|
|
162
|
+
python -m universal_log --demo null
|
|
163
|
+
|
|
164
|
+
# Run built-in non-regression test suite
|
|
165
|
+
python -m universal_log --self-test
|
|
166
|
+
|
|
167
|
+
# Print frozen routing gates, stubs, surrogate rules, and non-claims
|
|
168
|
+
python -m universal_log --describe-limits
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Key CLI Flags
|
|
172
|
+
|
|
173
|
+
- `--input`: Path to CSV, Parquet, or JSON file.
|
|
174
|
+
- `--control`: Ordered control axis column name (auto-inferred if omitted).
|
|
175
|
+
- `--target`: Target variable column name (auto-inferred if omitted).
|
|
176
|
+
- `--mode`: Sampling preset: `fast`, `robust`, or `full`.
|
|
177
|
+
- `--detection-mode`: `auto` (selects among `level_shift`, `detrended_jump`, and `slope_break` when appropriate) or `mean` (raw level shift only).
|
|
178
|
+
- `--output`: Output directory (default: `./results_v7`).
|
|
179
|
+
- `--complexity-diagnostics`: Enable exploratory calibrated `T_log`, full-flux estimators, and `L7` sliding-window interactions (disabled by default on the standard `analyze()` path; required by `predict_universal()`). A single-pass `L5` pre/post-$T_0$ contrast across the 13 unique dimension estimators always runs on the default path as a non-voting descriptor.
|
|
180
|
+
- `--describe-limits`: Print frozen `DEFAULT_ROUTING_GATES`, estimator stubs, surrogate/grading limits, and non-claims.
|
|
181
|
+
- `--full-validation`: Enable heavy 3-cohort segmented MC + trajectory validation.
|
|
182
|
+
- `--harmonic-ablation`: Run optional harmonic-jitter robustness ablation.
|
|
183
|
+
- `--seed`: Random seed (default: `42`).
|
|
184
|
+
|
|
185
|
+
### Python API
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
from universal_log import UniversalConfig, analyze
|
|
189
|
+
|
|
190
|
+
config = UniversalConfig(
|
|
191
|
+
seed=42,
|
|
192
|
+
mode="robust",
|
|
193
|
+
detection_mode="auto",
|
|
194
|
+
output_dir="./results_v7",
|
|
195
|
+
verbose=True,
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
result = analyze("datasets/demo_step.csv", config=config)
|
|
199
|
+
print(result["grade"]["grade"], result["scan"]["control_value"])
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Execution Modes
|
|
205
|
+
|
|
206
|
+
| Mode | Bootstrap | Pairwise Permutations | Scan Permutations | MC Paths (`--full-validation`) |
|
|
207
|
+
|------|-----------|-----------------------|-------------------|--------------------------------|
|
|
208
|
+
| `fast` | 100 | 200 | 200 | 100 |
|
|
209
|
+
| `robust` | 300 | 500 | 500 | 200 |
|
|
210
|
+
| `full` | 1000 | 1000 | 1000 | 400 |
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Testing & Visualization
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Unit & integration tests
|
|
218
|
+
pytest -v
|
|
219
|
+
|
|
220
|
+
# Built-in non-regression checks
|
|
221
|
+
python -m universal_log --self-test
|
|
222
|
+
|
|
223
|
+
# Regenerate synthetic benchmark datasets
|
|
224
|
+
python tests/generate_test_datasets.py
|
|
225
|
+
|
|
226
|
+
# Run full synthetic benchmark suite and write reports to results/reports/
|
|
227
|
+
python tests/run_tests.py
|
|
228
|
+
|
|
229
|
+
# Run multi-mode stability comparison (fast vs robust)
|
|
230
|
+
python tests/run_multi_mode_tests.py
|
|
231
|
+
|
|
232
|
+
# Run cross-domain benchmark on 19 real non-synthetic empirical datasets + predict_universal() validation
|
|
233
|
+
python tests/run_real_datasets.py --mode fast
|
|
234
|
+
|
|
235
|
+
# Run frozen gate sensitivity ablation (+-10%, +-20%)
|
|
236
|
+
python tests/run_ablation.py --ablation
|
|
237
|
+
|
|
238
|
+
# Prepare blind SHA-256 holdout manifest (downloads, hashes code + data, NO analysis)
|
|
239
|
+
python tests/run_ablation.py --prepare-holdout
|
|
240
|
+
|
|
241
|
+
# Evaluate blind holdout ONCE (verifies code/data hashes, then runs analyze)
|
|
242
|
+
python tests/run_ablation.py --evaluate-holdout
|
|
243
|
+
|
|
244
|
+
# Render summary plots to results/visualizations/
|
|
245
|
+
python tests/visualize_results.py
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Outputs
|
|
251
|
+
|
|
252
|
+
Each `analyze()` run writes four files into `--output`:
|
|
253
|
+
|
|
254
|
+
1. **`results.json`**: Full structured output (`universal_contract`, `scan`, `level_shift_scan`, `structural_scans`, `cascade`, `levels` L1–L7, `falsification`, `walk_forward`, `grade`, `estimators_by_flux`, `t_log_target`, `invariance_rename_test`, `manifest`).
|
|
255
|
+
2. **`thresholds.csv`**: Central threshold $T_0$ and 5-point derivative cascade ($T_{-2}, T_{-1}, T_0, T_{+1}, T_{+2}$).
|
|
256
|
+
3. **`report.txt`**: Concise human-readable summary.
|
|
257
|
+
4. **`report.html`**: Self-contained interactive HTML5/SVG visual report (series + $T_0$ + cascade $T_{-2}\dots T_{+2}$ + active transformed view + null comparison + L1–L7 & estimators) directly openable offline in any browser.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Disclaimer
|
|
262
|
+
|
|
263
|
+
**STATUS:** Threshold detection and falsification instrument.
|
|
264
|
+
- **NOT** scientific proof of a causal theory.
|
|
265
|
+
- **NOT** a medical diagnosis.
|
|
266
|
+
- **NOT** financial advice.
|
|
267
|
+
|
|
268
|
+
All detected thresholds (even Grade A) must be interpreted cautiously and replicated on independent data.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Documentation
|
|
273
|
+
|
|
274
|
+
- [**Interactive GitHub Pages Showcase**](https://findprint.github.io/2026-11-28/) (`docs/index.html`) — 300 DPI figures + 10 embedded interactive HTML5/SVG reports
|
|
275
|
+
- [**Preprint PDF (`paper/UNIVERSAL_LOG_v7.6.0_preprint.pdf`)**](paper/UNIVERSAL_LOG_v7.6.0_preprint.pdf) · [`paper/paper.md`](paper/paper.md) & [`paper/paper.bib`](paper/paper.bib) — JOSS/arXiv paper + 300 DPI figures + [`CITATION.cff`](CITATION.cff) / [`.zenodo.json`](.zenodo.json)
|
|
276
|
+
- [**Livre Blanc Complet (`LIVRE_BLANC.md`)**](LIVRE_BLANC.md) — Monolithe documentaire vivant (les 3 Voies, théorie `T_log`, résultats mesurés, journal)
|
|
277
|
+
- [Guide des 3 Voies (`tracks/README.md`)](tracks/README.md)
|
|
278
|
+
- [Spécification canonique `T_log` (`docs/tlog_spec.md`)](docs/tlog_spec.md)
|
|
279
|
+
- [T_log calibré v7.4.0 (`theory/calibrated/TLOG_calibrated_v7.4.0.md`)](theory/calibrated/TLOG_calibrated_v7.4.0.md) & [Concept original (`theory/original/TLog_original.txt`)](theory/original/TLog_original.txt)
|
|
280
|
+
- [Technical Documentation](docs/technical_documentation.md)
|
|
281
|
+
- [Testing Guide](docs/testing_guide.md)
|
|
282
|
+
- [Real Datasets Guide](docs/real_datasets_guide.md)
|
|
283
|
+
- [Project Summary](PROJECT_SUMMARY.md)
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## License
|
|
288
|
+
|
|
289
|
+
MIT License — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# UNIVERSAL_LOG (v7.6.0)
|
|
2
|
+
|
|
3
|
+
[](https://github.com/FindPrint/2026-11-28/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/FindPrint/2026-11-28/releases/tag/v7.6.0)
|
|
5
|
+
[](https://www.python.org/)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://colab.research.google.com/github/FindPrint/2026-11-28/blob/main/monoliths/UNIVERSAL_LOG_v7.6.0_universal.ipynb)
|
|
8
|
+
[](https://findprint.github.io/2026-11-28/)
|
|
9
|
+
|
|
10
|
+
**Domain-agnostic structural threshold detection and falsification for time series and multidimensional systems.**
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
`UNIVERSAL_LOG` is a statistical instrument for detecting regime changes, abrupt jumps, slope breaks, and structural phase transitions without domain priors. It combines vectorized sliding-window effect sizes, multi-channel structural detectors, permutation-based and AR(1) falsification suites, walk-forward validation, and 29 complexity/topological estimators organized across levels **L1–L7**.
|
|
17
|
+
|
|
18
|
+
### Core Design Principles (v7)
|
|
19
|
+
|
|
20
|
+
- **P1 — Zero domain priors:** No domain names, domain lexicons, or domain-tuned heuristics in code.
|
|
21
|
+
- **P2 — No hand-tuned weights:** Inverse-variance stability weighting (`1 / (1 + CV)`), or equal weights.
|
|
22
|
+
- **P3 — Name-invariant direction:** Direction equals the empirical sign of Cohen's *d* (verified at runtime by column-rename invariance tests).
|
|
23
|
+
- **P4 — No harmonic prior:** Uniform Monte Carlo and permutation nulls; harmonic jitter is an optional comparative ablation only.
|
|
24
|
+
- **P5 — Falsification first:** Every threshold faces permutation-corrected scans, white-noise nulls, shuffled-target nulls, AR(1) surrogate nulls, split-half checks, multi-window stability, and walk-forward validation.
|
|
25
|
+
- **P6 — Effect + CI + *p*:** Never a bare score alone.
|
|
26
|
+
- **P7 — Full reproducibility:** Fixed seeds, input/code metadata, SHA-256 hashes, and deterministic outputs.
|
|
27
|
+
- **P8 — Calibrated diagnostic ($T_{\log}$):** $T_{\log}$ is explicitly calibrated against its temporal permutation null and serves strictly as a diagnostic, never as proof.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
### Requirements
|
|
34
|
+
|
|
35
|
+
- Python 3.10+
|
|
36
|
+
- `numpy`, `pandas`, `scipy` (core)
|
|
37
|
+
- `matplotlib`, `seaborn` (visualization)
|
|
38
|
+
- `pytest`, `pytest-cov` (testing)
|
|
39
|
+
- `ripser` (optional, for Vietoris-Rips `PersistentHomology`; autonomous `H0_UnionFind` fallback built-in since v7.6.0)
|
|
40
|
+
|
|
41
|
+
### Editable / Local Install
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Install from PyPI (import name: universal_log)
|
|
45
|
+
pip install universal-log-ts
|
|
46
|
+
|
|
47
|
+
# Or editable local install from source
|
|
48
|
+
pip install -r requirements.txt
|
|
49
|
+
pip install -e ".[dev]"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
With optional persistent homology support:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install -e ".[dev,full]"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Project Structure
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
11-27-2026/
|
|
64
|
+
├── LIVRE_BLANC.md # Master living whitepaper ("monolithe pour tous", auto-synced)
|
|
65
|
+
├── universal_log/ # Voie 3 (canonical): modular Python package (v7.6.0)
|
|
66
|
+
│ ├── __init__.py # Public API exports (13 symbols)
|
|
67
|
+
│ ├── __main__.py # Entry point for `python -m universal_log`
|
|
68
|
+
│ ├── cli.py # CLI argument parser & --describe-limits
|
|
69
|
+
│ ├── config.py # UniversalConfig & mode presets
|
|
70
|
+
│ ├── data.py # UniversalDataset loader & synthetic demos
|
|
71
|
+
│ ├── stats.py # Cohen's d, bootstrap CI, permutation tests
|
|
72
|
+
│ ├── estimators.py # 29 complexity estimators (incl. autonomous H0_UnionFind) + calibrated T_log
|
|
73
|
+
│ ├── detection.py # Vectorized scans, 5 structural channels, cascade
|
|
74
|
+
│ ├── falsification.py # Falsification suite, AR(1)/ARIMA(1,1,0)/vol_arima_0_1_0, walk-forward, grading
|
|
75
|
+
│ ├── diagnostics.py # Optional segmented MC + Step 1-4 suite
|
|
76
|
+
│ ├── levels.py # L1..L7 universal structural diagnostics
|
|
77
|
+
│ ├── prediction.py # Locked cross-study motif prediction
|
|
78
|
+
│ ├── pipeline.py # analyze() orchestration & exports
|
|
79
|
+
│ ├── report_html.py # Self-contained offline HTML5/SVG report renderer
|
|
80
|
+
│ └── regression.py # Built-in non-regression self-tests
|
|
81
|
+
├── tracks/ # The analytical tracks (Voie 1, Voie 1.1, Voie 2, Voie 3 pointer)
|
|
82
|
+
│ ├── README.md # Comparative guide & CLI invocation for all tracks
|
|
83
|
+
│ ├── voie_1_holographique_v6.5.0/ # Voie 1: holographic 2-layer T_log, 3-anchor triangulation, CSD, L1-L7a/b
|
|
84
|
+
│ ├── voie_1_holographique_v6.6.0/ # Voie 1.1: calibrated double-null holographic track (30-60x faster, H0_UnionFind)
|
|
85
|
+
│ ├── voie_2_socle_p1_p8_v7.1.5/ # Voie 2: minimalist P1-P8 single-channel baseline + 3-cohort MC
|
|
86
|
+
│ └── voie_3_instrument_calibre_v7.6.0/ # Pointer to universal_log/ & monoliths/
|
|
87
|
+
├── monoliths/ # Generated single-file Voie 3 monoliths (.py & .ipynb, v7.6.0)
|
|
88
|
+
├── theory/ # Theoretical T_log corpus (original concept + calibrated v7.4/v7.5)
|
|
89
|
+
├── docs/ # Technical, testing, real-data, and canonical T_log spec
|
|
90
|
+
├── tools/ # Monolith builders, SHA-256 manifest, whitepaper sync, track comparator
|
|
91
|
+
├── UNIVERSAL_LOG_v7.1.5_universal.py # Backward-compatible CLI/import shim (delegates to v7.6.0)
|
|
92
|
+
├── datasets/ # 9 synthetic benchmark CSVs + metadata
|
|
93
|
+
├── datasets_real/ # 19 real non-synthetic empirical CSVs (+ occupancy) + metadata
|
|
94
|
+
├── datasets_holdout*/ # 6 chronological SHA-256 blind holdout cohorts (R, v731, v732, v740, v750, v760)
|
|
95
|
+
├── tests/ # Unit tests (37), SOTA benchmark, H0 IAAFT replication, holdout/showcase, ablation, viz
|
|
96
|
+
├── notebooks/exploration.ipynb # Interactive Jupyter exploration notebook
|
|
97
|
+
├── .github/workflows/ci.yml # Automated CI/CD pipeline
|
|
98
|
+
├── MANIFEST.sha256 # Complete SHA-256 provenance manifest
|
|
99
|
+
├── pyproject.toml # Package configuration
|
|
100
|
+
├── pytest.ini # Pytest configuration
|
|
101
|
+
├── requirements.txt # Python dependencies
|
|
102
|
+
└── LICENSE # MIT License
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Usage
|
|
108
|
+
|
|
109
|
+
### Command Line
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Analyze a CSV / Parquet / JSON dataset
|
|
113
|
+
python -m universal_log --input datasets/demo_step.csv --mode fast --output results/demo_step
|
|
114
|
+
|
|
115
|
+
# Or via installed console script (after `pip install -e .`)
|
|
116
|
+
universal-log --input datasets/demo_step.csv --mode robust
|
|
117
|
+
|
|
118
|
+
# Specify explicit control and target columns
|
|
119
|
+
python -m universal_log --input data.csv --control time --target signal_1
|
|
120
|
+
|
|
121
|
+
# Run synthetic built-in demos
|
|
122
|
+
python -m universal_log --demo step
|
|
123
|
+
python -m universal_log --demo logistic
|
|
124
|
+
python -m universal_log --demo null
|
|
125
|
+
|
|
126
|
+
# Run built-in non-regression test suite
|
|
127
|
+
python -m universal_log --self-test
|
|
128
|
+
|
|
129
|
+
# Print frozen routing gates, stubs, surrogate rules, and non-claims
|
|
130
|
+
python -m universal_log --describe-limits
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Key CLI Flags
|
|
134
|
+
|
|
135
|
+
- `--input`: Path to CSV, Parquet, or JSON file.
|
|
136
|
+
- `--control`: Ordered control axis column name (auto-inferred if omitted).
|
|
137
|
+
- `--target`: Target variable column name (auto-inferred if omitted).
|
|
138
|
+
- `--mode`: Sampling preset: `fast`, `robust`, or `full`.
|
|
139
|
+
- `--detection-mode`: `auto` (selects among `level_shift`, `detrended_jump`, and `slope_break` when appropriate) or `mean` (raw level shift only).
|
|
140
|
+
- `--output`: Output directory (default: `./results_v7`).
|
|
141
|
+
- `--complexity-diagnostics`: Enable exploratory calibrated `T_log`, full-flux estimators, and `L7` sliding-window interactions (disabled by default on the standard `analyze()` path; required by `predict_universal()`). A single-pass `L5` pre/post-$T_0$ contrast across the 13 unique dimension estimators always runs on the default path as a non-voting descriptor.
|
|
142
|
+
- `--describe-limits`: Print frozen `DEFAULT_ROUTING_GATES`, estimator stubs, surrogate/grading limits, and non-claims.
|
|
143
|
+
- `--full-validation`: Enable heavy 3-cohort segmented MC + trajectory validation.
|
|
144
|
+
- `--harmonic-ablation`: Run optional harmonic-jitter robustness ablation.
|
|
145
|
+
- `--seed`: Random seed (default: `42`).
|
|
146
|
+
|
|
147
|
+
### Python API
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
from universal_log import UniversalConfig, analyze
|
|
151
|
+
|
|
152
|
+
config = UniversalConfig(
|
|
153
|
+
seed=42,
|
|
154
|
+
mode="robust",
|
|
155
|
+
detection_mode="auto",
|
|
156
|
+
output_dir="./results_v7",
|
|
157
|
+
verbose=True,
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
result = analyze("datasets/demo_step.csv", config=config)
|
|
161
|
+
print(result["grade"]["grade"], result["scan"]["control_value"])
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Execution Modes
|
|
167
|
+
|
|
168
|
+
| Mode | Bootstrap | Pairwise Permutations | Scan Permutations | MC Paths (`--full-validation`) |
|
|
169
|
+
|------|-----------|-----------------------|-------------------|--------------------------------|
|
|
170
|
+
| `fast` | 100 | 200 | 200 | 100 |
|
|
171
|
+
| `robust` | 300 | 500 | 500 | 200 |
|
|
172
|
+
| `full` | 1000 | 1000 | 1000 | 400 |
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Testing & Visualization
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
# Unit & integration tests
|
|
180
|
+
pytest -v
|
|
181
|
+
|
|
182
|
+
# Built-in non-regression checks
|
|
183
|
+
python -m universal_log --self-test
|
|
184
|
+
|
|
185
|
+
# Regenerate synthetic benchmark datasets
|
|
186
|
+
python tests/generate_test_datasets.py
|
|
187
|
+
|
|
188
|
+
# Run full synthetic benchmark suite and write reports to results/reports/
|
|
189
|
+
python tests/run_tests.py
|
|
190
|
+
|
|
191
|
+
# Run multi-mode stability comparison (fast vs robust)
|
|
192
|
+
python tests/run_multi_mode_tests.py
|
|
193
|
+
|
|
194
|
+
# Run cross-domain benchmark on 19 real non-synthetic empirical datasets + predict_universal() validation
|
|
195
|
+
python tests/run_real_datasets.py --mode fast
|
|
196
|
+
|
|
197
|
+
# Run frozen gate sensitivity ablation (+-10%, +-20%)
|
|
198
|
+
python tests/run_ablation.py --ablation
|
|
199
|
+
|
|
200
|
+
# Prepare blind SHA-256 holdout manifest (downloads, hashes code + data, NO analysis)
|
|
201
|
+
python tests/run_ablation.py --prepare-holdout
|
|
202
|
+
|
|
203
|
+
# Evaluate blind holdout ONCE (verifies code/data hashes, then runs analyze)
|
|
204
|
+
python tests/run_ablation.py --evaluate-holdout
|
|
205
|
+
|
|
206
|
+
# Render summary plots to results/visualizations/
|
|
207
|
+
python tests/visualize_results.py
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Outputs
|
|
213
|
+
|
|
214
|
+
Each `analyze()` run writes four files into `--output`:
|
|
215
|
+
|
|
216
|
+
1. **`results.json`**: Full structured output (`universal_contract`, `scan`, `level_shift_scan`, `structural_scans`, `cascade`, `levels` L1–L7, `falsification`, `walk_forward`, `grade`, `estimators_by_flux`, `t_log_target`, `invariance_rename_test`, `manifest`).
|
|
217
|
+
2. **`thresholds.csv`**: Central threshold $T_0$ and 5-point derivative cascade ($T_{-2}, T_{-1}, T_0, T_{+1}, T_{+2}$).
|
|
218
|
+
3. **`report.txt`**: Concise human-readable summary.
|
|
219
|
+
4. **`report.html`**: Self-contained interactive HTML5/SVG visual report (series + $T_0$ + cascade $T_{-2}\dots T_{+2}$ + active transformed view + null comparison + L1–L7 & estimators) directly openable offline in any browser.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Disclaimer
|
|
224
|
+
|
|
225
|
+
**STATUS:** Threshold detection and falsification instrument.
|
|
226
|
+
- **NOT** scientific proof of a causal theory.
|
|
227
|
+
- **NOT** a medical diagnosis.
|
|
228
|
+
- **NOT** financial advice.
|
|
229
|
+
|
|
230
|
+
All detected thresholds (even Grade A) must be interpreted cautiously and replicated on independent data.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Documentation
|
|
235
|
+
|
|
236
|
+
- [**Interactive GitHub Pages Showcase**](https://findprint.github.io/2026-11-28/) (`docs/index.html`) — 300 DPI figures + 10 embedded interactive HTML5/SVG reports
|
|
237
|
+
- [**Preprint PDF (`paper/UNIVERSAL_LOG_v7.6.0_preprint.pdf`)**](paper/UNIVERSAL_LOG_v7.6.0_preprint.pdf) · [`paper/paper.md`](paper/paper.md) & [`paper/paper.bib`](paper/paper.bib) — JOSS/arXiv paper + 300 DPI figures + [`CITATION.cff`](CITATION.cff) / [`.zenodo.json`](.zenodo.json)
|
|
238
|
+
- [**Livre Blanc Complet (`LIVRE_BLANC.md`)**](LIVRE_BLANC.md) — Monolithe documentaire vivant (les 3 Voies, théorie `T_log`, résultats mesurés, journal)
|
|
239
|
+
- [Guide des 3 Voies (`tracks/README.md`)](tracks/README.md)
|
|
240
|
+
- [Spécification canonique `T_log` (`docs/tlog_spec.md`)](docs/tlog_spec.md)
|
|
241
|
+
- [T_log calibré v7.4.0 (`theory/calibrated/TLOG_calibrated_v7.4.0.md`)](theory/calibrated/TLOG_calibrated_v7.4.0.md) & [Concept original (`theory/original/TLog_original.txt`)](theory/original/TLog_original.txt)
|
|
242
|
+
- [Technical Documentation](docs/technical_documentation.md)
|
|
243
|
+
- [Testing Guide](docs/testing_guide.md)
|
|
244
|
+
- [Real Datasets Guide](docs/real_datasets_guide.md)
|
|
245
|
+
- [Project Summary](PROJECT_SUMMARY.md)
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## License
|
|
250
|
+
|
|
251
|
+
MIT License — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "universal-log-ts"
|
|
3
|
+
version = "7.6.0"
|
|
4
|
+
description = "UNIVERSAL_LOG — Domain-agnostic threshold detection, multi-channel structural breaks, and falsification"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
license = {text = "MIT"}
|
|
8
|
+
authors = [
|
|
9
|
+
{name = "Zackary Drasse-Ménard (FindPrint)"}
|
|
10
|
+
]
|
|
11
|
+
keywords = ["threshold-detection", "time-series", "change-point", "falsification", "persistent-homology", "complexity"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 4 - Beta",
|
|
14
|
+
"Intended Audience :: Science/Research",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.10",
|
|
18
|
+
"Programming Language :: Python :: 3.11",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
"Topic :: Scientific/Engineering",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
dependencies = [
|
|
24
|
+
"numpy>=1.20.0",
|
|
25
|
+
"pandas>=1.3.0",
|
|
26
|
+
"scipy>=1.7.0",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://findprint.github.io/2026-11-28/"
|
|
31
|
+
Repository = "https://github.com/FindPrint/2026-11-28"
|
|
32
|
+
Documentation = "https://github.com/FindPrint/2026-11-28/blob/main/LIVRE_BLANC.md"
|
|
33
|
+
Issues = "https://github.com/FindPrint/2026-11-28/issues"
|
|
34
|
+
|
|
35
|
+
[project.optional-dependencies]
|
|
36
|
+
viz = [
|
|
37
|
+
"matplotlib>=3.6.0",
|
|
38
|
+
"seaborn>=0.12.0",
|
|
39
|
+
]
|
|
40
|
+
full = [
|
|
41
|
+
"ripser>=0.6.0",
|
|
42
|
+
]
|
|
43
|
+
dev = [
|
|
44
|
+
"pytest>=7.0.0",
|
|
45
|
+
"pytest-cov>=3.0.0",
|
|
46
|
+
"flake8>=6.0.0",
|
|
47
|
+
"matplotlib>=3.6.0",
|
|
48
|
+
"seaborn>=0.12.0",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
[project.scripts]
|
|
52
|
+
universal-log = "universal_log.cli:main"
|
|
53
|
+
|
|
54
|
+
[build-system]
|
|
55
|
+
requires = ["setuptools>=61", "wheel"]
|
|
56
|
+
build-backend = "setuptools.build_meta"
|
|
57
|
+
|
|
58
|
+
[tool.setuptools]
|
|
59
|
+
packages = ["universal_log"]
|
|
60
|
+
|
|
61
|
+
[tool.black]
|
|
62
|
+
line-length = 100
|
|
63
|
+
target-version = ["py39", "py310", "py311"]
|
|
64
|
+
|
|
65
|
+
[tool.isort]
|
|
66
|
+
profile = "black"
|
|
67
|
+
line_length = 100
|