Trait fbleau::estimates::BayesEstimator [−][src]
Every estimator should implement this trait.
Required methods
fn add_example(&mut self, x: &ArrayView1<'_, f64>, y: Label) -> Result<(), ()>
[src]
Adds a new training example.
fn get_error_count(&self) -> usize
[src]
Returns the current number of errors.
fn get_error(&self) -> f64
[src]
Returns the current error rate.
fn get_individual_errors(&self) -> Vec<bool>
[src]
Returns the current errors for each test point.
true
means error, false
no error.
Implementors
impl BayesEstimator for FrequentistEstimator
[src]
fn add_example(&mut self, x: &ArrayView1<'_, f64>, y: Label) -> Result<(), ()>
[src]
Adds a new training example.
fn get_error_count(&self) -> usize
[src]
Returns the current number of errors.
fn get_error(&self) -> f64
[src]
Returns the current error rate.
fn get_individual_errors(&self) -> Vec<bool>
[src]
Returns the current errors for each test point.
impl<D> BayesEstimator for KNNEstimator<D> where
D: Fn(&ArrayView1<'_, f64>, &ArrayView1<'_, f64>) -> f64 + Send + Sync + Copy,
[src]
D: Fn(&ArrayView1<'_, f64>, &ArrayView1<'_, f64>) -> f64 + Send + Sync + Copy,
fn add_example(&mut self, x: &ArrayView1<'_, f64>, y: Label) -> Result<(), ()>
[src]
Adds a new example to the k-NN estimator's training data.
This also updates the prediction, if necessary.
fn get_error_count(&self) -> usize
[src]
Returns the error count for the current k.
fn get_error(&self) -> f64
[src]
Returns the error for the current k.
fn get_individual_errors(&self) -> Vec<bool>
[src]
Returns the current errors for each test point.
impl<D> BayesEstimator for NNBoundEstimator<D> where
D: Fn(&ArrayView1<'_, f64>, &ArrayView1<'_, f64>) -> f64 + Send + Sync + Copy,
[src]
D: Fn(&ArrayView1<'_, f64>, &ArrayView1<'_, f64>) -> f64 + Send + Sync + Copy,
This implementation maps exactly that of KNNEstimator, except for get_error(), which returns the bound.
fn add_example(&mut self, x: &ArrayView1<'_, f64>, y: Label) -> Result<(), ()>
[src]
Adds a new example.
fn get_error_count(&self) -> usize
[src]
Returns the error count.
fn get_error(&self) -> f64
[src]
Returns the error for the current k.
fn get_individual_errors(&self) -> Vec<bool>
[src]
Returns the current errors for each test point.