Skip to main content

nested-recd

Correction (0.2.3). Versions ≤ 0.2.2 computed H_joint and the pairwise entropies inside Syn with np.unique on a list of tuples and no axis=0. NumPy flattens that input, so Syn, excess3 and binary phi3 were not the published definition when N ≥ 3. Surp and Res_pair were not affected. For N = 2, Syn is 0 either way. 0.2.3 counts joint rows. legacy_pooled_counting=True reproduces the old numbers and warns. See CHANGELOG.md. This version: 10.5281/zenodo.22970079. The 0.2.2 deposit remains 10.5281/zenodo.21937204.

PyPI version Python License: MIT

Nested ordinal RECD — pure-NumPy implementation of nested ordinal conjunction levels (Φ₁, Φ₂, Φ₃), the continuous excess³ Level-3 proxy (T-IV; not the strong residual), optional Res_pair (=\mathrm{KL}(P|P^{(2)})), Gibbs-α weights, and λ-weighted Discrete Extramental Clock (RECD) accumulation.

This is the canonical nested-clock software for the Systemic Tau / RECD stack (foundations paper, excess³ methods preprint, cardiac CCTP/SDDB pilot, Academy Learning Tau).

Léxico (no negociable): strong Level-3 := Res_pair. excess3 := exportable proxy. Report w with any Res_pair figure. Abundance (excess3) ≠ aggregation share (f_3).

Install

pip install nested-recd

From source (development):

pip install -e ".[dev]"

excess³ contract (methods)

Canonical specification: Padilla-Villanueva (2026), excess³: A Pre-Specified Continuous Proxy…
DOI: 10.5281/zenodo.21385937 · repo: github.com/johelpadilla/excess3

Rule Software
excess3 = 0.6·Syn + 0.4·Surp ALPHA_SYN, ALPHA_SURP (fixed a priori)
Continuous primary out["excess3"] / compute_phi3_excess
Φ₃ secondary binary ticks of excess3 vs theta3
Null on full contrast surrogate_pvalue_delta_excess3 (phase-shuffle / permute on |Δ|)
Proxy ≠ full PID documented; no complete Williams–Beer atom claimed
Parallel nesting Φ₁, Φ₂, excess³ computed without hard Boolean ascent

Defaults: m=3, delay 1, window 13, theta3=0.10 (software); cardio-like reference DEFAULT_THETA3_CARDIO=0.08.

Quick start

import numpy as np
from nested_recd import compute_recd_from_conjunctions, ALPHA_SYN, ALPHA_SURP

rng = np.random.default_rng(0)
X = rng.normal(size=(800, 3)).cumsum(axis=0)

out = compute_recd_from_conjunctions(X, m=3, d=4, theta3=0.10)

print("mean excess³ (primary):", float(np.nanmean(out["excess3"])))
print("Φ3 active fraction:", float(np.nanmean(out["phi3"] > 0)))
print("weights:", out["params"]["alpha_syn"], out["params"]["alpha_surp"])
print("final T_recd:", float(out["T_recd"][-1]))

Strong residual Res_pair (optional)

out = compute_recd_from_conjunctions(X, compute_res=True)
# or, on a symbol window:
from nested_recd import compute_res_pair_window
# Always report window length with Res_pair (Nota 4: w=13 can bias chaos).

Continuous excess³ only

from nested_recd import generate_multivariate_symbols, compute_phi3_excess

S = generate_multivariate_symbols(X, m=3)
phi3, excess3 = compute_phi3_excess(S, window=13, theta=0.10, stride=1)

Surrogate p-value on |Δ excess3|

from nested_recd import surrogate_pvalue_delta_excess3

res = surrogate_pvalue_delta_excess3(X, split=400, n_surr=99, method="phase", seed=0)
print(res["delta_obs"], res["p_value"])

Optional τ_s for λ regime weights

out = compute_recd_from_conjunctions(X, tau_s=tau_s)
# or
out = compute_recd_from_conjunctions(X, lam_override=0.5)

Note: delta_recd / T_recd use binary Φ₃ in the α-weighted clock (legacy Discrete Extramental Clock). For exportable / scalable Level-3 reporting, use continuous excess³ and nulls on |Δ excess3|. For strong Level-3 claims, report res_pair (enable compute_res=True) and the window w. Do not identify the two.

What it computes

Symbol Meaning
Φ₁ Co-occurrence of identical ordinal symbols across variable pairs
Φ₂ Persistence of pairwise ordinal relations over lag d
excess³ Continuous hybrid: 0.6·Syn + 0.4·Surp (exportable Level-3 proxy; T-IV)
Φ₃ Binary ticks of excess³ above theta3 (secondary)
Res_pair Strong Level-3 residual KL(P ‖ P^(2)) (optional; always report w)
λ Chaos / reorganization intensity (from τ_s or lam_override)
α(λ) Design-engine weights (template or Gibbs-α); not a joint observable
ΔRECD α₁Φ₁ + α₂Φ₂ + α₃Φ₃ (legacy clock; binary Φ₃)
T_recd Cumulative sum of ΔRECD

Ordinal symbols use Bandt–Pompe patterns (m=3 by default).

Surrogates

from nested_recd import phase_shuffle_independent, random_permutation_independent

X_null = phase_shuffle_independent(X, seed=42)
X_perm = random_permutation_independent(X, seed=42)

API surface

from nested_recd import (
    ALPHA_SYN, ALPHA_SURP,
    DEFAULT_THETA3, DEFAULT_THETA3_CARDIO,
    compute_recd_from_conjunctions,
    compute_phi1, compute_phi2, compute_phi3,
    compute_phi3_excess, compute_excess3_window,
    mean_excess_pre_post, surrogate_pvalue_delta_excess3,
    compute_lambda, alpha_weights, alpha_weights_gibbs, regime_lambda_proxy,
    compute_res_pair, compute_res_pair_window,
    compute_weighted_contributions, high_level3_rate,
    generate_multivariate_symbols,
    phase_shuffle_independent, generate_surrogate_ensemble,
)

Relation to other projects

Project Role
systemictau Full Systemic Tau library (τ_s, gate RECD, studio) — optional [nested] extra
systemictau-web Streamlit app; depends on this package
excess3 Methods + intro ES + primer (specification)
cctp-sddb-systemic-tau Cardiac VF pilot
This package Lightweight, installable nested-time / excess³ core

Citation

If you use excess³ / Level-3 from this package, cite the methods preprint (canonical specification):

Padilla-Villanueva, J. (2026). excess³: A Pre-Specified Continuous Proxy for Order-3 Synergistic Surplus (methods). Zenodo. https://doi.org/10.5281/zenodo.21385937

This software (0.2.3):

Padilla-Villanueva, J. (2026). nested-recd 0.2.3: Nested ordinal RECD, excess³ proxy, and Res_pair. Zenodo. https://doi.org/10.5281/zenodo.22970079

The previous release (0.2.2), which pooled symbols inside Syn, remains citable as https://doi.org/10.5281/zenodo.21937204.

Software / related stack:

Padilla-Villanueva, J. (2026). Systemic Tau software archive. Zenodo. https://doi.org/10.5281/zenodo.20576241

CCTP/SDDB pilot:

Padilla-Villanueva, J. (2026). CCTP/SDDB: Systemic Tau and ordinal RECD before spontaneous ventricular fibrillation (v1.0.1). Zenodo. https://doi.org/10.5281/zenodo.21270699

@software{padilla_nested_recd_2026,
  author  = {Padilla-Villanueva, Johel},
  title   = {nested-recd: Nested ordinal RECD levels and continuous excess³},
  year    = {2026},
  url     = {https://github.com/johelpadilla/nested-recd},
  version = {0.2.3},
  doi     = {10.5281/zenodo.22970079}
}

License

MIT © 2026 Johel Padilla-Villanueva
ORCID: 0000-0002-5797-6931

Release files for nested-recd 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nested-recd 0.2.3
File Size Uploaded
nested_recd-0.2.3.tar.gz 26.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nested-recd 0.2.3
File Interpreter ABI Platform
nested_recd-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 46.7 kB

Release files / nested_recd-0.2.3.tar.gz

Download URL nested_recd-0.2.3.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
44be7ee98791cf3269ec6be12689d32de86f6d5a8e1fc961e519d87fe0bed22c
BLAKE2b-256 checksum
How to use checksums
93d7d2f705cbf0cbe331b355cec8d3fd65dd31ce42ee72b1eec26868fceef28f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release files / nested_recd-0.2.3-py3-none-any.whl

Download URL nested_recd-0.2.3-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9548daac8d117a07771be59c85c94310d1e975fea34fd0ec4437523b49c53b9
BLAKE2b-256 checksum
How to use checksums
daa1a7126aedd64ace2994aca581254d4399a2527fede25f6ee088094bed39c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page