Skip to content

v0.27.0

Latest

Choose a tag to compare

@fesanghary fesanghary released this 10 Sep 19:51
· 1 commit to main since this release
f2da46f

Added

  • LUCID (causalts.confounders) — regime-adaptive deconfounding for causal discovery
    under latent confounders. run_lucid(df, max_lag) diagnoses whether latent confounding
    is sparse or pervasive from the residual spectrum (against a Marchenko–Pastur no-factor
    null) and applies the matching correction, returning a LucidResult. Every
    CausalResult now also exposes .deconfound(), .tetrad_filter(), and .pds_filter()
    so LUCID (or a fixed-strategy comparator) can be applied to a graph already discovered
    with any algorithm, without re-running the skeleton search. See the new
    Unobserved Confounders (LUCID) tutorial and the
    causalts.confounders API page.
  • DoWhy effects bridge. validate_transition_graph() and history_sufficiency()
    validate a lag-embedded graph (replacing the deprecated falsify_graph());
    refute_effect() and sensitivity_analysis() stress-test an estimate;
    build_identification_artifacts() / build_transition_artifacts() hand back a graph
    and the frame it belongs with, for driving DoWhy directly. All are on the result
    objects, and causal-ts dowhy validate --test exposes the validators from the CLI.
  • corrplot(..., diag="glyph") — renders the diagonal as an ordinary cell,
    using the same method and colormap as the rest of the matrix. Intended for
    directed matrices (a cause→effect adjacency or an edge-stability matrix),
    where the diagonal is real data such as a self-loop rather than the trivial
    1.0 of a correlation matrix. Significance markers and confidence-interval
    overlays are still skipped on the diagonal.

Fixed

  • Breaking. estimate_effect() reported an unadjusted regression as an identified
    causal effect — a lagged treatment had no parents, so no backdoor path was found. The
    graph is now unrolled and the adjustment set verified against the fitted estimator.
    ATEs change.
  • The GES, LGES and TGES baselines were substantially understated. ges_discovery
    read causal-learn's adjacency matrix with the endpoints transposed, and the vendored
    GES search behind lges_discovery / tges_discovery had a broken CPDAG construction
    that stopped LGES far short of convergence. Both are fixed and now apply temporal
    background knowledge; F1 on baseline_comparison moves from 0.125–0.522 to 0.636–0.949.
    Any prior comparison against these baselines understates them.
  • refute_effect() no longer reports an uncomputable refutation as a failure, and
    refute_structure() returns p_value and adjusted_p_value separately. DoWhy's
    renamed identification APIs are bound by capability, not version.
  • causal-ts ci-test-info --test <name> now shows only the selected test's
    summary instead of the full guide. Registered tests without a guide section
    report a clear error; the default and --test all output are unchanged.
  • The CI test selection guide now covers all registered tests. parcorr,
    cmiknn, cmiknn-mixed-gpu, fisherz, chisq and gsquared had no entry,
    so ci-test-info --test <name> failed for them. The cmiknn-gpu entry also
    now notes that its permutation null stops early.
  • priority=3 and priority=4 (collider strength ordering) now raise ValueError
    at the entry point, instead of failing with an AttributeError from inside
    causal-learn after the skeleton search. They score each conflict over the full
    powerset of the endpoints' neighbours — exponential in node degree — and were
    never wired to a CI test. Use priority=1 (abstain) or 2 (keep first).
  • detect_subsampling raises ValueError on a 1-D or single-variable input, instead of
    failing inside NumPy with LinAlgError: 0-dimensional array given.
  • The generator in the Unobserved Confounders (LUCID) tutorial injected its true lag-1
    edges after the recursion instead of inside it, so the simulated data did not match the
    ground truth the notebook scored against.
  • corrplot dropped the right and bottom edges of its grid border. All axes
    spines are hidden, and the border was drawn with axhline/axvline at
    exactly the axis limits, so half of each boundary line fell outside the clip
    box. The border is now an unclipped rectangle and all four edges render.
  • corrplot(..., colorbar=False) was ignored for the colour-only glyph methods
    ("color", "shade"), which silently overrode an explicit argument and
    forced callers to use cl_pos="n" instead. colorbar=False now suppresses
    the colorbar for every method.
  • Documentation: the "New in v0.26" banner linked to the example notebook with a
    path relative to the site root, but the banner renders on every page — from
    anything below the root (examples/, api/, getting_started/) it resolved to
    a nonexistent nested path and 404'd. The link is now resolved per page.

Changed

  • run_cdnots_plus defaults changed — this can change results for existing
    callers that don't pin these parameters explicitly.
    run_cdnots_plus now
    follows PCMCI+'s conventions more closely: colliders that conflict during
    orientation are abstained on rather than tie-broken (priority=1, was 2),
    MCI conditioning excludes only the exact tested lag rather than every lag of
    a variable (legacy_mci_conds=False), the nonstationarity sink search stops
    when candidates aren't clearly separated rather than always committing
    (orient_margin=0.1, was unconditional), and the default significance level
    is alpha=0.01 (was 0.05), matching PCMCI+ and empirically better for
    CDNOTS+ (plain run_cdnots is unaffected and keeps alpha=0.05). In
    aggregate these changes track PCMCI+ much more closely on stationary and
    latently-confounded data while widening CDNOTS+'s advantage over plain
    CDNOTS where nonstationarity is real. Pin the old values explicitly
    (priority=2, legacy_mci_conds=True, orient_margin=0.0, alpha=0.05) to
    reproduce prior behavior.

  • causalts.ci_tests.SigKCIGPU no longer uses the optional sigkernel
    package: it crashed with a buffer dtype mismatch whenever sigkernel was
    installed, and measured slower than the existing pure-torch fallback at the
    path lengths this test uses. SigKCIGPU now always uses that fallback.

  • The guided_discovery example notebook is now agentic_discovery ("Agentic
    Causal Discovery"), naming it after the causal-ts-discovery agent skill whose
    workflow it walks through. The old examples/guided_discovery.html URL is gone;
    the page is at examples/agentic_discovery.html.