pub struct ProximalGradientSolver {
pub lipschitz: f64,
pub max_iter: usize,
pub tol: f64,
pub accelerated: bool,
}Expand description
Proximal gradient method (ISTA/FISTA) for composite optimization.
Minimizes f(x) + g(x) where f is L-smooth (known Lipschitz constant) and g has a cheap prox operator. Supports both ISTA (beta=0) and FISTA (beta>0, Nesterov momentum).
Fields§
§lipschitz: f64Lipschitz constant L of gradient of f.
max_iter: usizeMaximum number of iterations.
tol: f64Convergence tolerance on successive iterate change.
accelerated: boolUse FISTA acceleration (true) or plain ISTA (false).
Implementations§
Source§impl ProximalGradientSolver
impl ProximalGradientSolver
Sourcepub fn new(lipschitz: f64, max_iter: usize, tol: f64, accelerated: bool) -> Self
pub fn new(lipschitz: f64, max_iter: usize, tol: f64, accelerated: bool) -> Self
Create a proximal gradient solver.
Sourcepub fn minimize<F, G>(
&self,
smooth: &F,
regularizer: &G,
x0: &[f64],
) -> (Vec<f64>, usize)where
F: ConvexFunction,
G: ProxableFunction,
pub fn minimize<F, G>(
&self,
smooth: &F,
regularizer: &G,
x0: &[f64],
) -> (Vec<f64>, usize)where
F: ConvexFunction,
G: ProxableFunction,
Minimize smooth + regularizer. Returns (x_star, iters).
Sourcepub fn estimate_lipschitz<F: ConvexFunction>(
f: &F,
x: &[f64],
num_trials: usize,
) -> f64
pub fn estimate_lipschitz<F: ConvexFunction>( f: &F, x: &[f64], num_trials: usize, ) -> f64
Estimate the Lipschitz constant via power iteration on the Hessian approximation.
Returns an upper bound on L by computing max ||grad f(x + eps * v) - grad f(x)||/eps.
Trait Implementations§
Source§impl Clone for ProximalGradientSolver
impl Clone for ProximalGradientSolver
Source§fn clone(&self) -> ProximalGradientSolver
fn clone(&self) -> ProximalGradientSolver
Returns a duplicate of the value. Read more
1.0.0 · 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 ProximalGradientSolver
impl RefUnwindSafe for ProximalGradientSolver
impl Send for ProximalGradientSolver
impl Sync for ProximalGradientSolver
impl Unpin for ProximalGradientSolver
impl UnsafeUnpin for ProximalGradientSolver
impl UnwindSafe for ProximalGradientSolver
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