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 field
  • labels: counted labels with label-count association

Implementations

impl<L: Label, S: Labels<Elem = L>> CountedTargets<L, S>[src]

pub fn new(targets: S) -> Self[src]

Trait Implementations

impl<L: Label, T: AsTargets<Elem = L>> AsTargets for CountedTargets<L, T>[src]

type Elem = L

impl<L: Label, T: AsTargetsMut<Elem = L>> AsTargetsMut for CountedTargets<L, T>[src]

type 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>, 
[src]

type Owned = CountedTargets<L, T::Owned>

type View = CountedTargets<L, T::View>

Auto Trait Implementations

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> 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> UnwindSafe for CountedTargets<L, P> where
    L: UnwindSafe,
    P: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,