Skip to main content

SearchConfig

Struct SearchConfig 

Source
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: usize

Maximum depth of the tree (remaining depth, below the root).

§min_sup: usize

Minimum number of instances in each leaf.

§max_time: f64

Time limit in seconds.

§max_gap: usize

Error gap tolerated with respect to the optimum; 0 for an exact search.

§max_error: usize

Initial upper bound on the error.

§is_root: bool

Whether this configuration is the root’s.

§use_heuristic: bool

Order features and thresholds by Gini impurity.

§fast_d2: bool

Use the specialised solver for depth-2 subtrees.

§point_selector: PointSelector

How thresholds are picked inside an interval.

§nb_runs: usize

Number of passes run so far (anytime search).

§discrepancy: usize

Discrepancy used on the path to this node (anytime search).

§budget: usize

Discrepancy budget of the current pass (anytime search).

Implementations§

Source§

impl SearchConfig

Source

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.

Source

pub fn derive_left(&self) -> Self

The configuration of the first child searched: one level shallower, with part of the gap.

Source

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

Source§

fn clone(&self) -> SearchConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SearchConfig

Source§

impl Debug for SearchConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V