[−][src]Struct linfa_elasticnet::ElasticNet
Elastic Net model
This struct contains the parameters of a fitted elastic net model. This includes the seperating hyperplane, (optionally) intercept, duality gaps and the number of step needed in the computation.
Implementations
impl<F: Float> ElasticNet<F>[src]
View the fitted parameters and make predictions with a fitted elastic net model
pub fn parameters(&self) -> &Array1<F>[src]
Get the fitted parameters
pub fn intercept(&self) -> F[src]
Get the fitted intercept, 0. if no intercept was fitted
pub fn n_steps(&self) -> u32[src]
Get the number of steps taken in optimization algorithm
pub fn duality_gap(&self) -> F[src]
Get the duality gap at the end of the optimization algorithm
pub fn z_score(&self) -> Result<Array1<F>>[src]
Calculate the Z score
pub fn confidence_95th(&self) -> Result<Array1<(F, F)>>[src]
Calculate the confidence level
impl<F: Float> ElasticNet<F>[src]
pub fn params() -> ElasticNetParams<F>[src]
Create a default elastic net model
By default, an intercept will be fitted. To disable fitting an
intercept, call .with_intercept(false) before calling .fit().
To additionally normalize the feature matrix before fitting, call
fit_intercept_and_normalize() before calling fit(). The feature
matrix will not be normalized by default.
pub fn ridge() -> ElasticNetParams<F>[src]
Create a ridge model
pub fn lasso() -> ElasticNetParams<F>[src]
Create a lasso model
Trait Implementations
impl<F: Float, D: Data<Elem = F>> Predict<&'_ ArrayBase<D, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>> for ElasticNet<F>[src]
impl<F: Float, D: Data<Elem = F>> Predict<ArrayBase<D, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>> for ElasticNet<F>[src]
Auto Trait Implementations
impl<F> RefUnwindSafe for ElasticNet<F> where
F: RefUnwindSafe, [src]
F: RefUnwindSafe,
impl<F> Send for ElasticNet<F> where
F: Send, [src]
F: Send,
impl<F> Sync for ElasticNet<F> where
F: Sync, [src]
F: Sync,
impl<F> Unpin for ElasticNet<F> where
F: Unpin, [src]
F: Unpin,
impl<F> UnwindSafe for ElasticNet<F> where
F: RefUnwindSafe + UnwindSafe, [src]
F: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,