deep_causality_algorithms 0.4.2

Computational causality algorithms and utils used in the DeepCausality project.
Documentation
[package]
name = "deep_causality_algorithms"
version = "0.4.2"
edition = { workspace = true }
rust-version = { workspace = true }
license = { workspace = true }
readme = "README.md"

description = "Computational causality algorithms and utils used in the DeepCausality project."
documentation = "https://docs.rs/deep_causality"
homepage = "https://deepcausality.com/"
repository = "https://github.com/deepcausality/deep_causality.rs"
keywords = ["surd", "causal-graph", "causal-reasoning", "algorithms"]
categories = ["algorithms", "science", "aerospace", "finance", "mathematics"]
authors = ["Marvin Hansen <marvin.hansen@gmail.com>", ]
exclude = [
    "*.bazel",
    "*/*.bazel",
    "*.bazel.*",
    "BUILD",
    "BUILD.bazel",
    "MODULE.bazel",
    ".bazelignore",
    ".bazelrc",
    "tests/**/*",
    "papers/*",
]

[dependencies.deep_causality_tensor]
path = "../deep_causality_tensor"
version = "0.5"

[dependencies.deep_causality_num]
path = "../deep_causality_num"
version = "0.4"

[dependencies.deep_causality_algebra]
path = "../deep_causality_algebra"
version = "0.2"

[dependencies.deep_causality_topology]
path = "../deep_causality_topology"
version = "0.7"

[dependencies.deep_causality_rand]
path = "../deep_causality_rand"
version = "0.2"

# Feature-conditional thread-safety marker (`MaybeParallel`): vacuous on serial
# builds, `Send + Sync` when `parallel` is forwarded below. 
[dependencies.deep_causality_par]
path = "../deep_causality_par"
version = "0.1"

[dependencies.rayon]
version = "1.12"
optional = true


[features]
default = []
# Enables parallel execution (via Rayon) of the SURD decomposition and the BRCD
# per-candidate ranking loop; forwards `deep_causality_par/parallel` so the shared
# `MaybeParallel` bound resolves to `Send + Sync`. Disabled by default.
parallel = ["dep:rayon", "deep_causality_par/parallel"]


[package.metadata.docs.rs]
all-features = true

[dev-dependencies]
criterion = {  version = "0.8" }

[[bench]]
name = "mrmr_benchmark"
harness = false

[[bench]]
name = "brcd_benchmark"
harness = false

[[bench]]
name = "brcd_benchmark_wide"
harness = false

# --- BRCD verification examples (run individually) ---
# Base verification: self-contained synthetic recovery (no Python needed).
#   cargo run -p deep_causality_algorithms --example verification_base
[[example]]
name = "verification_base"
path = "verification/brcd/verification_base.rs"

# Comparison: MAP-config pruning vs full enumeration (accuracy/compute).
# Exact config counts (2^du vs du+1) plus a controlled-degree clique sweep and a
# scaled-n random-CPDAG sweep.
#   cargo run --release -p deep_causality_algorithms --example brcd_eval_accuracy_compute
[[example]]
name = "brcd_eval_accuracy_compute"
path = "verification/brcd/brcd_eval_accuracy_compute.rs"

# BOSS structure-learning verification: self-contained structural recovery plus
# a learned-CPDAG (cpdag=None) end-to-end run on committed Online Boutique data.
#   cargo run -p deep_causality_algorithms --example verification_boss
[[example]]
name = "verification_boss"
path = "verification/brcd/verification_boss.rs"

# Supplied-CPDAG vs BOSS-learned comparison (illustrates the learned-vs-map gap).
# Sock Shop completes; Online Boutique's ~50-var / 2100-row cases can be intractable
# for a learned CPDAG (exponential in local undirected degree) — see the OB example docs.
#   cargo run --release -p deep_causality_algorithms --example verification_boss_sockshop
#   cargo run --release -p deep_causality_algorithms --example verification_boss_online_boutique
[[example]]
name = "verification_boss_sockshop"
path = "verification/brcd/verification_boss_sockshop.rs"

[[example]]
name = "verification_boss_online_boutique"
path = "verification/brcd/verification_boss_online_boutique.rs"

# Real-world verification (Online Boutique): replays committed Python-derived
#   cargo run -p deep_causality_algorithms --example verification_online_boutique
[[example]]
name = "verification_online_boutique"
path = "verification/brcd/verification_online_boutique.rs"

# Real-world verification (Sock Shop).
#   cargo run -p deep_causality_algorithms --example verification_sockshop
[[example]]
name = "verification_sockshop"
path = "verification/brcd/verification_sockshop.rs"

[lints]
workspace = true