Skip to main content

dtrees_rs/algorithms/optimal/rules/
mod.rs

1//! Rules that decide, at each node, whether the DL8.5 search goes on.
2//!
3//! The search consults two sets of rules. *Node rules* ([`common`]) encode the
4//! problem: maximum depth, minimum support, pure nodes and bounds. *Search
5//! rules* restrict the search to make it anytime: they cut branches such as
6//! the ones beyond a discrepancy budget ([`DiscrepancyRule`], LDS-DL8.5) or
7//! beyond the `k` best-ranked features ([`TopkRule`], Top-k-DL8.5).
8//!
9//! When a relaxable rule has cut part of the search, the search is restarted
10//! with every rule relaxed (its budget widened), until no rule cuts anything
11//! and the tree is optimal. This is the CA-DL8.5 framework of Kiossou and
12//! Schaus, *A Generic Complete Anytime Beam Search for Optimal Decision Trees*
13//! (IDA 2026).
14
15mod core;
16mod manager;
17
18pub use core::Reason;
19pub use core::{Rule, RuleContext, RuleResult, RuleState};
20pub use manager::RuleManager;
21
22pub mod common;
23mod discrepancy;
24mod gain;
25mod helpers;
26mod purity;
27mod topk;
28
29pub use discrepancy::DiscrepancyRule;
30pub use gain::GainRule;
31pub use helpers::*;
32pub use purity::PurityRule;
33pub use topk::{DecreasingTopkRule, TopkRule};