pub struct SearchConfig {
pub max_depth: usize,
pub min_sup: usize,
pub max_time: f64,
pub max_gap: usize,
pub max_error: usize,
pub is_root: bool,
pub use_heuristic: bool,
pub fast_d2: bool,
pub point_selector: PointSelector,
pub nb_runs: usize,
pub discrepancy: usize,
pub budget: usize,
}Expand description
Settings of a search, and the per-node state derived from them.
Fields§
§max_depth: usizeMaximum depth of the tree (remaining depth, below the root).
min_sup: usizeMinimum number of instances in each leaf.
max_time: f64Time limit in seconds.
max_gap: usizeError gap tolerated with respect to the optimum; 0 for an exact search.
max_error: usizeInitial upper bound on the error.
is_root: boolWhether this configuration is the root’s.
use_heuristic: boolOrder features and thresholds by Gini impurity.
fast_d2: boolUse the specialised solver for depth-2 subtrees.
point_selector: PointSelectorHow thresholds are picked inside an interval.
nb_runs: usizeNumber of passes run so far (anytime search).
discrepancy: usizeDiscrepancy used on the path to this node (anytime search).
budget: usizeDiscrepancy budget of the current pass (anytime search).
Implementations§
Source§impl SearchConfig
impl SearchConfig
Sourcepub fn new(
min_sup: usize,
max_depth: usize,
max_time: f64,
max_gap: usize,
max_error: usize,
use_heuristic: bool,
fast_d2: bool,
split_strategy: PointSelector,
) -> Self
pub fn new( min_sup: usize, max_depth: usize, max_time: f64, max_gap: usize, max_error: usize, use_heuristic: bool, fast_d2: bool, split_strategy: PointSelector, ) -> Self
A root configuration with the given settings.
Sourcepub fn derive_left(&self) -> Self
pub fn derive_left(&self) -> Self
The configuration of the first child searched: one level shallower, with part of the gap.
Sourcepub fn derive_right(&self, left_gap: usize) -> Self
pub fn derive_right(&self, left_gap: usize) -> Self
The configuration of the second child searched, given the gap already handed to the first.
Trait Implementations§
Source§impl Clone for SearchConfig
impl Clone for SearchConfig
Source§fn clone(&self) -> SearchConfig
fn clone(&self) -> SearchConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more