pub enum RidgeSolver {
Auto,
Cholesky,
Svd,
}Expand description
Solver used for the dense single-output Ridge coefficient solve.
Mirrors a (dense) subset of scikit-learn’s solver parameter
(sklearn/linear_model/_ridge.py:830 resolve_solver). Only the
closed-form dense solvers are implemented here; the iterative solvers
(lsqr/sparse_cg/sag/saga/lbfgs) are tracked separately as
REQ-8b (blocker #386) and are intentionally NOT represented as variants
until their iterative/SGD substrate lands.
Every dense solver returns the IDENTICAL ridge solution — the problem is
strictly convex (alpha > 0, or alpha = 0 with full-rank X), so the
minimizer is unique. The variant therefore only governs how the unique
solution is computed, not what it is.
This governs only the single-output (Fit<Array2, Array1>) dense
unconstrained solve. The multi-output (Fit<Array2, Array2>) path and the
positive=true constrained path are unaffected by this setting.
Variants§
Auto
'auto' — resolve automatically. For the dense path this resolves to
Cholesky (sklearn resolve_solver,
_ridge.py:830: dense, non-positive data → 'cholesky').
Cholesky
'cholesky' — solve the normal equations (XᵀX + alpha·I)·w = Xᵀy
via a Cholesky factorization (_solve_cholesky, _ridge.py:741).
Svd
'svd' — solve via the singular value decomposition of X
(_solve_svd, _ridge.py:200). Numerically identical to
Cholesky on the strictly-convex ridge
problem (unique minimizer).
Trait Implementations§
Source§impl Clone for RidgeSolver
impl Clone for RidgeSolver
Source§fn clone(&self) -> RidgeSolver
fn clone(&self) -> RidgeSolver
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RidgeSolver
Source§impl Debug for RidgeSolver
impl Debug for RidgeSolver
Source§impl Default for RidgeSolver
impl Default for RidgeSolver
Source§fn default() -> RidgeSolver
fn default() -> RidgeSolver
impl Eq for RidgeSolver
Source§impl PartialEq for RidgeSolver
impl PartialEq for RidgeSolver
Source§fn eq(&self, other: &RidgeSolver) -> bool
fn eq(&self, other: &RidgeSolver) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RidgeSolver
Auto Trait Implementations§
impl Freeze for RidgeSolver
impl RefUnwindSafe for RidgeSolver
impl Send for RidgeSolver
impl Sync for RidgeSolver
impl Unpin for RidgeSolver
impl UnsafeUnpin for RidgeSolver
impl UnwindSafe for RidgeSolver
Blanket Implementations§
impl<T> Boilerplate for T
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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