Struct linfa::composing::MultiTargetModel[][src]

pub struct MultiTargetModel<R: Records, L> { /* fields omitted */ }

Merge models with single target to multi-target models

Many models assume that the target variables are uncorrelated and support therefore only a single target variable. This wrapper allows the user to merge multiple models with only a single-target variable into a multi-target model.

Implementations

impl<R: Records, L> MultiTargetModel<R, L>[src]

pub fn new(models: Vec<Box<dyn PredictRef<R, Array1<L>>>>) -> Self[src]

Create a wrapper model from a list of single-target models

The type parameter of the single-target models are only constraint to implement the prediction trait and can otherwise contain any object. This allows the mixture of different models into the same wrapper. If you want to use the same model for all predictions, just use the FromIterator implementation.

Trait Implementations

impl<F: Float, D: Data<Elem = F>, L, P: PredictRef<ArrayBase<D, Ix2>, Array1<L>> + 'static> FromIterator<P> for MultiTargetModel<ArrayBase<D, Ix2>, L>[src]

impl<L, F: Float, D: Data<Elem = F>> PredictRef<ArrayBase<D, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<L>, Dim<[usize; 2]>>> for MultiTargetModel<ArrayBase<D, Ix2>, L>[src]

Auto Trait Implementations

impl<R, L> !RefUnwindSafe for MultiTargetModel<R, L>

impl<R, L> !Send for MultiTargetModel<R, L>

impl<R, L> !Sync for MultiTargetModel<R, L>

impl<R, L> Unpin for MultiTargetModel<R, L>

impl<R, L> !UnwindSafe for MultiTargetModel<R, L>

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<'a, F, D, T, O> Predict<&'a ArrayBase<D, Dim<[usize; 2]>>, T> for O where
    F: Float,
    D: Data<Elem = F>,
    O: PredictRef<ArrayBase<D, Dim<[usize; 2]>>, T>, 
[src]

impl<'a, F, R, T, S, O> Predict<&'a DatasetBase<R, T>, S> for O where
    R: Records<Elem = F>,
    F: Float,
    O: PredictRef<R, S>, 
[src]

impl<F, D, T, O> Predict<ArrayBase<D, Dim<[usize; 2]>>, DatasetBase<ArrayBase<D, Dim<[usize; 2]>>, T>> for O where
    F: Float,
    D: Data<Elem = F>,
    O: PredictRef<ArrayBase<D, Dim<[usize; 2]>>, T>, 
[src]

impl<F, R, T, S, O> Predict<DatasetBase<R, T>, DatasetBase<R, S>> for O where
    R: Records<Elem = F>,
    F: Float,
    O: PredictRef<R, S>, 
[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>,