Skip to main content

fit_with_platt

Function fit_with_platt 

Source
fn fit_with_platt(
    x: &[f32],
    y: &[i8],
    width: usize,
    c: f64,
    options: &Options,
    cancel: &Cancel,
    step: &mut dyn FnMut(&str),
) -> Result<(Model, Platt, u64), LearnError>
Expand description

The SVM learned from every row (time order), cost c, and Platt’s sigmoid from forward folds over them: each fifth scored by an SVM learned from the fifths before it. When the folds give none (too few of a kind early on), the model’s own scores, which make it surer than it is. step is told after each fit; the scores the sigmoid was fitted on are counted.