pub enum Solver {
Svd,
Lsqr,
Eigen,
}Expand description
LDA solver selector (sklearn’s solver, discriminant_analysis.py:204-216,
_parameter_constraints StrOptions({svd, lsqr, eigen}) :338).
Solver::Svd(default) — the singular-value-decomposition path (_solve_svd,discriminant_analysis.py:487-559); supportstransform(dimensionality reduction) but NOTshrinkage.Solver::Lsqr— the least-squares path (_solve_lstsq,discriminant_analysis.py:365-419):coef_ = lstsq(covariance_, means_.T).T,intercept_ = -½·diag(means_ @ coef_.T) + log(priors_). Supportsshrinkage; does NOT supporttransform(sklearn raisesNotImplementedError,:676-679).Solver::Eigen— the generalized-eigenvalue path (_solve_eigen,discriminant_analysis.py:421-485): formsSw/St, solves the generalizedeigh(Sb, Sw)(reduced to a STANDARD symmetric eigenproblem via the Cholesky factor ofSw), and yieldsscalings_,coef_,intercept_,explained_variance_ratio_. Supportsshrinkageandtransform(the un-centeredX @ scalings_).
Variants§
Svd
Singular-value-decomposition solver (sklearn default).
Lsqr
Least-squares solver (_solve_lstsq).
Eigen
Generalized-eigenvalue solver (_solve_eigen), via Cholesky reduction.
Trait Implementations§
impl Copy for Solver
impl Eq for Solver
impl StructuralPartialEq for Solver
Auto Trait Implementations§
impl Freeze for Solver
impl RefUnwindSafe for Solver
impl Send for Solver
impl Sync for Solver
impl Unpin for Solver
impl UnsafeUnpin for Solver
impl UnwindSafe for Solver
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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