Struct linfa::dataset::CountedTargets [−][src]
pub struct CountedTargets<L: Label, P> { /* fields omitted */ }
Expand description
Targets with precomputed, counted labels
This extends plain targets with pre-counted labels. The label map is useful when, for example, a prior probability is estimated (e.g. in Naive Bayesian implementation) or the samples are weighted inverse to their occurence.
Fields
targets
: wrapped target fieldlabels
: counted labels with label-count association
Implementations
Trait Implementations
type Elem = L
Returns a mutable view on targets as two-dimensional array
Convert to single target, fails for more than one target
impl<'a, L: Label + 'a, T> FromTargetArray<'a, L> for CountedTargets<L, T> where
T: AsTargets<Elem = L> + FromTargetArray<'a, L>,
T::Owned: Labels<Elem = L>,
T::View: Labels<Elem = L>,
impl<'a, L: Label + 'a, T> FromTargetArray<'a, L> for CountedTargets<L, T> where
T: AsTargets<Elem = L> + FromTargetArray<'a, L>,
T::Owned: Labels<Elem = L>,
T::View: Labels<Elem = L>,
type Owned = CountedTargets<L, T::Owned>
type View = CountedTargets<L, T::View>
Create self object from new target array