pub struct AcceleratedGradientSVM {
pub momentum: f64,
pub learning_rate: f64,
pub method: AcceleratedMethod,
/* private fields */
}Expand description
Accelerated Gradient SVM Solver
Implements accelerated gradient descent methods for SVM optimization, including Nesterov’s accelerated gradient method and FISTA. These methods achieve faster convergence rates than standard gradient descent.
Nesterov’s method uses momentum to accelerate convergence: y_{k+1} = x_k - γ∇f(x_k) x_{k+1} = y_{k+1} + β(y_{k+1} - y_k)
Reference: Nesterov, Y. (2013). Introductory lectures on convex optimization.
Fields§
§momentum: f64Momentum parameter (typically 0.9)
learning_rate: f64Learning rate schedule
method: AcceleratedMethodAccelerated method type
Implementations§
Source§impl AcceleratedGradientSVM
impl AcceleratedGradientSVM
Sourcepub fn new(config: AdvancedOptimizationConfig) -> Self
pub fn new(config: AdvancedOptimizationConfig) -> Self
Create a new accelerated gradient SVM solver
Sourcepub fn with_momentum(self, momentum: f64) -> Self
pub fn with_momentum(self, momentum: f64) -> Self
Set the momentum parameter
Sourcepub fn with_learning_rate(self, learning_rate: f64) -> Self
pub fn with_learning_rate(self, learning_rate: f64) -> Self
Set the learning rate
Sourcepub fn with_method(self, method: AcceleratedMethod) -> Self
pub fn with_method(self, method: AcceleratedMethod) -> Self
Set the accelerated method type
Sourcepub fn fit(
&mut self,
x: &Array2<f64>,
y: &Array1<f64>,
) -> Result<OptimizationResult>
pub fn fit( &mut self, x: &Array2<f64>, y: &Array1<f64>, ) -> Result<OptimizationResult>
Fit the SVM using accelerated gradient optimization
Sourcepub fn predict(
&self,
x: &Array2<f64>,
result: &OptimizationResult,
) -> Result<Array1<f64>>
pub fn predict( &self, x: &Array2<f64>, result: &OptimizationResult, ) -> Result<Array1<f64>>
Make predictions
Sourcepub fn decision_function(
&self,
x: &Array2<f64>,
result: &OptimizationResult,
) -> Result<Array1<f64>>
pub fn decision_function( &self, x: &Array2<f64>, result: &OptimizationResult, ) -> Result<Array1<f64>>
Compute decision function
Trait Implementations§
Source§impl Clone for AcceleratedGradientSVM
impl Clone for AcceleratedGradientSVM
Source§fn clone(&self) -> AcceleratedGradientSVM
fn clone(&self) -> AcceleratedGradientSVM
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AcceleratedGradientSVM
impl RefUnwindSafe for AcceleratedGradientSVM
impl Send for AcceleratedGradientSVM
impl Sync for AcceleratedGradientSVM
impl Unpin for AcceleratedGradientSVM
impl UnsafeUnpin for AcceleratedGradientSVM
impl UnwindSafe for AcceleratedGradientSVM
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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