Struct linfa::dataset::CountedTargets [−][src]
pub struct CountedTargets<L: Label, P> { /* fields omitted */ }
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
impl<L: Label, T: AsTargets<Elem = L>> AsTargets for CountedTargets<L, T>
[src]
impl<L: Label, T: AsTargets<Elem = L>> AsTargets for CountedTargets<L, T>
[src]type Elem = L
fn as_multi_targets(&self) -> ArrayView2<'_, L>
[src]
fn try_single_target(&self) -> Result<ArrayView1<'_, Self::Elem>>
[src]
impl<L: Label, T: AsTargetsMut<Elem = L>> AsTargetsMut for CountedTargets<L, T>
[src]
impl<L: Label, T: AsTargetsMut<Elem = L>> AsTargetsMut for CountedTargets<L, T>
[src]type Elem = L
fn as_multi_targets_mut(&mut self) -> ArrayViewMut2<'_, Self::Elem>
[src]
fn try_single_target_mut(&mut self) -> Result<ArrayViewMut1<'_, Self::Elem>>
[src]
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>,
[src]
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>,
[src]type Owned = CountedTargets<L, T::Owned>
type View = CountedTargets<L, T::View>
fn new_targets(targets: Array2<L>) -> Self::Owned
[src]
fn new_targets_view(targets: ArrayView2<'a, L>) -> Self::View
[src]
Auto Trait Implementations
impl<L, P> RefUnwindSafe for CountedTargets<L, P> where
L: RefUnwindSafe,
P: RefUnwindSafe,
impl<L, P> RefUnwindSafe for CountedTargets<L, P> where
L: RefUnwindSafe,
P: RefUnwindSafe,
impl<L, P> Send for CountedTargets<L, P> where
L: Send,
P: Send,
impl<L, P> Send for CountedTargets<L, P> where
L: Send,
P: Send,
impl<L, P> Sync for CountedTargets<L, P> where
L: Sync,
P: Sync,
impl<L, P> Sync for CountedTargets<L, P> where
L: Sync,
P: Sync,
impl<L, P> Unpin for CountedTargets<L, P> where
L: Unpin,
P: Unpin,
impl<L, P> Unpin for CountedTargets<L, P> where
L: Unpin,
P: Unpin,
impl<L, P> UnwindSafe for CountedTargets<L, P> where
L: UnwindSafe,
P: UnwindSafe,
impl<L, P> UnwindSafe for CountedTargets<L, P> where
L: UnwindSafe,
P: UnwindSafe,