[−][src]Struct sparrow::scanner::booster::learner::Learner
Statisitics of all weak rules that are being evaluated.
The objective of Learner
is to find a weak rule that satisfies the condition of
the stopping rule.
Fields
rho_gamma: f32
expand_node: usize
total_count: usize
Methods
impl Learner
[src]
pub fn new(
min_gamma: f32,
default_gamma: f32,
num_features: usize,
bins: Vec<Bins>,
num_splits: usize
) -> Learner
[src]
min_gamma: f32,
default_gamma: f32,
num_features: usize,
bins: Vec<Bins>,
num_splits: usize
) -> Learner
Create a Learner
that search for valid weak rules.
default_gamma
is the initial value of the edge gamma
.
bins
is vectors of the all thresholds on all candidate features for generating weak rules.
pub fn reset(&mut self)
[src]
Reset the statistics of all candidate weak rules (except gamma, because the advantage of the root node is not likely to increase) Trigger when the model or the gamma is changed
pub fn get_max_empirical_ratio_tree_node(&self) -> TreeNode
[src]
pub fn is_gamma_significant(&self) -> bool
[src]
pub fn update(
&mut self,
tree: &Tree,
data: &[(LabeledData<u8, i8>, (f32, f32, usize, usize))]
) -> Option<TreeNode>
[src]
&mut self,
tree: &Tree,
data: &[(LabeledData<u8, i8>, (f32, f32, usize, usize))]
) -> Option<TreeNode>
Update the statistics of all candidate weak rules using current batch of training examples.
pub fn set_gamma(&mut self, gamma: f32) -> bool
[src]
pub fn set_expand_node(&mut self, expand_node: usize) -> bool
[src]
Trait Implementations
impl<'de> Deserialize<'de> for Learner
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Learner
[src]
Auto Trait Implementations
impl RefUnwindSafe for Learner
impl Send for Learner
impl Sync for Learner
impl Unpin for Learner
impl UnwindSafe for Learner
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,