//! 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;
}