1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* SPDX-License-Identifier: MIT
* Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved.
*/
//! Configuration for the BOSS structure-learning preprocessor.
//!
//! BOSS is not a standalone discovery algorithm here — it is the optional
//! preprocessing step that learns BRCD's required CPDAG from observational data
//! when none is supplied. Its files live under the `brcd` module with the
//! `brcd_boss_` prefix.
use FromPrimitive;
/// Default ridge `ε` added to the parent covariance block before the Schur
/// solve, matching the reference `local_score_BIC_from_cov` (`1e-6`).
pub const BOSS_RIDGE_DEFAULT: f64 = 1e-6;
/// Default BIC penalty discount `λ`, matching the reference (`lambda_value = 2`).
pub const BOSS_LAMBDA_DEFAULT: f64 = 2.0;
/// Configuration for a BOSS run.
///
/// Fields are public to mirror the sibling [`crate::brcd::BrcdConfig`]; the
/// constructors set the reference defaults. The two numeric knobs are pinned to
/// the reference (`ε = 1e-6`, `λ = 2`); `seed` drives the deterministic order
/// search (the per-sweep variable shuffle).