miniboosts 0.2.1

MiniBoosts: A collection of boosting algorithms written in Rust 🦀
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! The core library for the weak learner in the boosting protocol.
use crate::Sample;

/// An interface that returns a struct of type `Hypothesis`.
pub trait WeakLearner {
    /// Returned hypothesis generated by `self`.
    type Hypothesis;

    /// For classification, `WeakLearner::produce`
    /// outputs an instance of `Classifier` trait
    /// that achieves high accuracy
    /// on the given distribution `dist`.
    fn produce(&self, sample: &Sample, dist: &[f64])
        -> Self::Hypothesis;
}