Add HSCIC-CPT conditional independence test - #270
Open
felix-laumann wants to merge 1 commit into
Open
Conversation
Signed-off-by: Felix Laumann <22920497+felix-laumann@users.noreply.github.com>
felix-laumann
force-pushed
the
feature/hscic-cpt
branch
from
July 28, 2026 14:50
3342eec to
c4418ce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request adds HSCIC-CPT as a conditional independence test and exposes it through causal-learn's existing
CITand PC interfaces.Implementation fidelity
The CPT transition uses likelihood-matrix orientation, identity start, shared Markov-chain centre, disjoint-pair proposals, swap log-odds, and numerical truncation. Kernel bandwidth selection follows lower-median convention, including duplicated observations.
The lower-level
HSCICCPTclass remains directional because CPT resamples one variable conditionally. The public causal-discovery wrapper makes the test symmetric by testing both directions.Validation
python -m unittest tests.TestCIT_HSCICCPT— 13 tests passedpython -m pytest tests/TestCIT_HSCICCPT.py -q— 13 tests passedcompileall,codespell, andgit diff --checkpassedReferences