Trait linfa::dataset::AsTargets [−][src]
pub trait AsTargets { type Elem; fn as_multi_targets(&self) -> ArrayView2<'_, Self::Elem>; fn try_single_target(&self) -> Result<ArrayView1<'_, Self::Elem>> { ... } }
Return a reference to single or multiple target variables
Associated Types
Loading content...Required methods
fn as_multi_targets(&self) -> ArrayView2<'_, Self::Elem>
[src]
Returns a view on targets as two-dimensional array
Provided methods
fn try_single_target(&self) -> Result<ArrayView1<'_, Self::Elem>>
[src]
Convert to single target, fails for more than one target
Returns
May return a single target with the same label type, but returns an
Error::MultipleTargets
in case that there are more than a single target.
Implementations on Foreign Types
impl<'a, L, S: Data<Elem = L>> AsTargets for ArrayBase<S, Ix1>
[src]
impl<'a, L, S: Data<Elem = L>> AsTargets for ArrayBase<S, Ix1>
[src]type Elem = L
fn as_multi_targets(&self) -> ArrayView2<'_, L>
[src]
impl<L, S: Data<Elem = L>> AsTargets for ArrayBase<S, Ix2>
[src]
impl<L, S: Data<Elem = L>> AsTargets for ArrayBase<S, Ix2>
[src]type Elem = L
fn as_multi_targets(&self) -> ArrayView2<'_, L>
[src]
impl<T: AsTargets> AsTargets for &T
[src]
impl<T: AsTargets> AsTargets for &T
[src]type Elem = T::Elem
fn as_multi_targets(&self) -> ArrayView2<'_, Self::Elem>
[src]
Implementors
impl<L, R: Records, T: AsTargets<Elem = L>> AsTargets for DatasetBase<R, T>
[src]
impl<L, R: Records, T: AsTargets<Elem = L>> AsTargets for DatasetBase<R, T>
[src]type Elem = L
fn as_multi_targets(&self) -> ArrayView2<'_, Self::Elem>
[src]
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]