Struct linfa::dataset::CountedTargets [−][src]
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
impl<L: Label, S: Labels<Elem = L>> CountedTargets<L, S>
[src]
Trait Implementations
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]
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]
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>
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,
L: RefUnwindSafe,
P: RefUnwindSafe,
impl<L, P> Send for CountedTargets<L, P> where
L: Send,
P: Send,
L: Send,
P: Send,
impl<L, P> Sync for CountedTargets<L, P> where
L: Sync,
P: Sync,
L: Sync,
P: Sync,
impl<L, P> Unpin for CountedTargets<L, P> where
L: Unpin,
P: Unpin,
L: Unpin,
P: Unpin,
impl<L, P> UnwindSafe for CountedTargets<L, P> where
L: UnwindSafe,
P: UnwindSafe,
L: UnwindSafe,
P: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,