Trait linfa::dataset::FromTargetArray[][src]

pub trait FromTargetArray<'a, F> {
    type Owned;
    type View;
    fn new_targets(targets: Array2<F>) -> Self::Owned;
fn new_targets_view(targets: ArrayView2<'a, F>) -> Self::View; }

Helper trait to construct counted labels

This is implemented for objects which can act as targets and created from a target matrix. For targets represented as ndarray matrix this is identity, for counted labels, i.e. TargetsWithLabels, it creates the corresponding wrapper struct.

Associated Types

Loading content...

Required methods

fn new_targets(targets: Array2<F>) -> Self::Owned[src]

Create self object from new target array

fn new_targets_view(targets: ArrayView2<'a, F>) -> Self::View[src]

Loading content...

Implementations on Foreign Types

impl<'a, L: Clone + 'a, S: Data<Elem = L>> FromTargetArray<'a, L> for ArrayBase<S, Ix2>[src]

type Owned = ArrayBase<OwnedRepr<L>, Ix2>

type View = ArrayBase<ViewRepr<&'a L>, Ix2>

Loading content...

Implementors

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>

Loading content...