pub struct MultiTaskElasticNet<F> { /* private fields */ }
Expand description
MultiTask Elastic Net model
This struct contains the parameters of a fitted multi-task elastic net model. This includes the coefficients (a 2-dimensional array), (optionally) intercept (a 1-dimensional array), duality gaps and the number of steps needed in the computation.
§Model implementation
The block coordinate descent is widely used to solve generalized linear models optimization problems, like Group Lasso, MultiTask Ridge or MultiTask Lasso. It cycles through a group of parameters and update the groups separately, holding all the others fixed. The optimization routine stops when a criterion is satisfied (dual sub-optimality gap or change in coefficients).
Implementations§
Source§impl<F: Float> MultiTaskElasticNet<F>
View the fitted parameters and make predictions with a fitted
elastic net model
impl<F: Float> MultiTaskElasticNet<F>
View the fitted parameters and make predictions with a fitted elastic net model
Sourcepub fn hyperplane(&self) -> &Array2<F>
pub fn hyperplane(&self) -> &Array2<F>
Get the fitted hyperplane
Sourcepub fn intercept(&self) -> &Array1<F>
pub fn intercept(&self) -> &Array1<F>
Get the fitted intercept, [0., …, 0.] if no intercept was fitted Note that there are as many intercepts as tasks
Sourcepub fn duality_gap(&self) -> F
pub fn duality_gap(&self) -> F
Get the duality gap at the end of the optimization algorithm
Sourcepub fn confidence_95th(&self) -> Result<Array2<(F, F)>>
pub fn confidence_95th(&self) -> Result<Array2<(F, F)>>
Calculate the confidence level
Source§impl<F: Float> MultiTaskElasticNet<F>
impl<F: Float> MultiTaskElasticNet<F>
pub fn params() -> MultiTaskElasticNetParams<F>
Sourcepub fn ridge() -> MultiTaskElasticNetParams<F>
pub fn ridge() -> MultiTaskElasticNetParams<F>
Create a multi-task ridge only model
Sourcepub fn lasso() -> MultiTaskElasticNetParams<F>
pub fn lasso() -> MultiTaskElasticNetParams<F>
Create a multi-task Lasso only model
Trait Implementations§
Source§impl<F: Clone> Clone for MultiTaskElasticNet<F>
impl<F: Clone> Clone for MultiTaskElasticNet<F>
Source§fn clone(&self) -> MultiTaskElasticNet<F>
fn clone(&self) -> MultiTaskElasticNet<F>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<F: Debug> Debug for MultiTaskElasticNet<F>
impl<F: Debug> Debug for MultiTaskElasticNet<F>
Source§impl<F: Float, D: Data<Elem = F>> PredictInplace<ArrayBase<D, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>> for MultiTaskElasticNet<F>
impl<F: Float, D: Data<Elem = F>> PredictInplace<ArrayBase<D, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>> for MultiTaskElasticNet<F>
Auto Trait Implementations§
impl<F> Freeze for MultiTaskElasticNet<F>where
F: Freeze,
impl<F> RefUnwindSafe for MultiTaskElasticNet<F>where
F: RefUnwindSafe,
impl<F> Send for MultiTaskElasticNet<F>where
F: Send,
impl<F> Sync for MultiTaskElasticNet<F>where
F: Sync,
impl<F> Unpin for MultiTaskElasticNet<F>where
F: Unpin,
impl<F> UnwindSafe for MultiTaskElasticNet<F>where
F: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<'a, F, R, T, S, O> Predict<&'a DatasetBase<R, T>, S> for Owhere
R: Records<Elem = F>,
O: PredictInplace<R, S>,
impl<'a, F, R, T, S, O> Predict<&'a DatasetBase<R, T>, S> for Owhere
R: Records<Elem = F>,
O: PredictInplace<R, S>,
§impl<F, D, E, T, O> Predict<ArrayBase<D, Dim<[usize; 2]>>, DatasetBase<ArrayBase<D, Dim<[usize; 2]>>, T>> for O
impl<F, D, E, T, O> Predict<ArrayBase<D, Dim<[usize; 2]>>, DatasetBase<ArrayBase<D, Dim<[usize; 2]>>, T>> for O
§impl<F, R, T, E, S, O> Predict<DatasetBase<R, T>, DatasetBase<R, S>> for Owhere
R: Records<Elem = F>,
S: AsTargets<Elem = E>,
O: PredictInplace<R, S>,
impl<F, R, T, E, S, O> Predict<DatasetBase<R, T>, DatasetBase<R, S>> for Owhere
R: Records<Elem = F>,
S: AsTargets<Elem = E>,
O: PredictInplace<R, S>,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.