pub enum DualMode {
Auto,
True,
False,
}Expand description
Dual / primal optimization-problem selector for LinearSVC.
Mirrors sklearn.svm.LinearSVC’s dual parameter
(sklearn/svm/_classes.py:62-71, default "auto"). Auto resolves to a
concrete bool via _validate_dual_parameter (_classes.py:13-29): when
n_samples < n_features it prefers dual=true (falling back to false if
that penalty×loss combination has no dual solver); otherwise it prefers
dual=false (falling back to true if there is no primal solver, e.g.
hinge). The resolved dual selects the liblinear solver type
(_get_liblinear_solver_type, _base.py:1011-1018).
Under R-DEV-7 the resolved dual is observably immaterial for
penalty=l2: the l2 dual coordinate descent and the l2 primal both
minimize the same strongly convex 0.5·‖w‖² + C·Σ L and reach the same
coef_/intercept_. It is load-bearing only for the unsupported-combination
rejects and for selecting the genuinely different l1 primal solver.
Variants§
Auto
Resolve to true/false automatically via _validate_dual_parameter
(_classes.py:13-29); the default.
True
Solve the dual optimization problem.
False
Solve the primal optimization problem.
Trait Implementations§
impl Copy for DualMode
impl Eq for DualMode
impl StructuralPartialEq for DualMode
Auto Trait Implementations§
impl Freeze for DualMode
impl RefUnwindSafe for DualMode
impl Send for DualMode
impl Sync for DualMode
impl Unpin for DualMode
impl UnsafeUnpin for DualMode
impl UnwindSafe for DualMode
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