Trait linfa::dataset::AsTargets

source ·
pub trait AsTargets {
    type Elem;
    type Ix: TargetDim;

    // Required method
    fn as_targets(&self) -> ArrayView<'_, Self::Elem, Self::Ix>;
}
Expand description

Return a reference to single or multiple target variables.

This is generic over the dimension of the target array to support both single-target and multi-target variables.

Required Associated Types§

Required Methods§

source

fn as_targets(&self) -> ArrayView<'_, Self::Elem, Self::Ix>

Implementations on Foreign Types§

source§

impl<L, S: Data<Elem = L>, I: TargetDim> AsTargets for ArrayBase<S, I>

§

type Elem = L

§

type Ix = I

source§

fn as_targets(&self) -> ArrayView<'_, L, I>

source§

impl<T: AsTargets> AsTargets for &T

§

type Elem = <T as AsTargets>::Elem

§

type Ix = <T as AsTargets>::Ix

source§

fn as_targets(&self) -> ArrayView<'_, Self::Elem, Self::Ix>

Implementors§

source§

impl<L, R: Records, T: AsTargets<Elem = L>> AsTargets for DatasetBase<R, T>

§

type Elem = L

§

type Ix = <T as AsTargets>::Ix

source§

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

§

type Elem = L

§

type Ix = <T as AsTargets>::Ix