[][src]Trait vikos::Crisp

pub trait Crisp {
    type Truth;
    fn crisp(&self) -> Self::Truth;
}

Define this trait over the target type of a classifier, to convert it into its truth type

i.e. for a binary classifier returning a f64 this returns a bool which is true if the prediction is greater 0.5. For a classifier returning an [f64;n] it returns the index of the largest discriminant, which should be equal to the class index.

Associated Types

type Truth

The crisp type of the prediction.

Called Truth since it is identical to the Truth type used during learning. Although the instances returned by crisp are obviously still a prediction, just their type is identical to that of the truth.

Loading content...

Required methods

fn crisp(&self) -> Self::Truth

Return crisp prediction

Loading content...

Implementations on Foreign Types

impl Crisp for f64
[src]

type Truth = bool

Loading content...

Implementors

impl<A: Array<Element = f64>> Crisp for A
[src]

type Truth = usize

Loading content...