pub struct FISTA { /* private fields */ }Expand description
FISTA (Fast Iterative Shrinkage-Thresholding Algorithm).
Accelerated proximal gradient method for minimizing composite objectives:
minimize f(x) + g(x)where f is smooth and convex, g is convex (possibly non-smooth but “simple”).
FISTA achieves O(1/k²) convergence rate using Nesterov acceleration, compared to O(1/k) for standard proximal gradient (ISTA).
§Key Applications
- Lasso regression: f(x) = ½‖Ax - b‖², g(x) = λ‖x‖₁
- Elastic Net: f(x) = ½‖Ax - b‖², g(x) = λ₁‖x‖₁ + λ₂‖x‖₂²
- Total variation: Image denoising with TV regularization
- Non-negative least squares: f(x) = ½‖Ax - b‖², g(x) = indicator(x ≥ 0)
§Example
use aprender::optim::{FISTA, Optimizer, prox};
use aprender::primitives::Vector;
// Minimize: ½(x - 5)² + 2|x| (L1-regularized quadratic)
let smooth = |x: &Vector<f32>| 0.5 * (x[0] - 5.0).powi(2);
let grad_smooth = |x: &Vector<f32>| Vector::from_slice(&[x[0] - 5.0]);
let proximal = |v: &Vector<f32>, _alpha: f32| prox::soft_threshold(v, 2.0);
let mut fista = FISTA::new(1000, 0.1, 1e-5);
let x0 = Vector::from_slice(&[0.0]);
let result = fista.minimize(smooth, grad_smooth, proximal, x0);
// Check that optimization completed successfully
assert!(!result.solution[0].is_nan());§References
- Beck & Teboulle (2009). “A fast iterative shrinkage-thresholding algorithm for linear inverse problems.” SIAM Journal on Imaging Sciences, 2(1), 183-202.
Implementations§
Source§impl FISTA
impl FISTA
Sourcepub fn new(max_iter: usize, step_size: f32, tol: f32) -> Self
pub fn new(max_iter: usize, step_size: f32, tol: f32) -> Self
Creates a new FISTA optimizer.
§Arguments
max_iter- Maximum number of iterationsstep_size- Step size α (should be ≤ 1/L where L is Lipschitz constant of ∇f)tol- Convergence tolerance
§Returns
New FISTA optimizer instance
§Example
use aprender::optim::FISTA;
let optimizer = FISTA::new(1000, 0.01, 1e-6);Sourcepub fn minimize<F, G, P>(
&mut self,
smooth: F,
grad_smooth: G,
prox: P,
x0: Vector<f32>,
) -> OptimizationResult
pub fn minimize<F, G, P>( &mut self, smooth: F, grad_smooth: G, prox: P, x0: Vector<f32>, ) -> OptimizationResult
Minimizes a composite objective function using FISTA.
Solves: minimize f(x) + g(x) where f is smooth, g is “simple” (has easy prox).
§Type Parameters
F- Smooth objective function typeG- Gradient of smooth part typeP- Proximal operator type
§Arguments
smooth- Smooth part f(x)grad_smooth- Gradient ∇f(x)prox- Proximal operatorprox_g(v, α)x0- Initial point
§Returns
OptimizationResult with solution and convergence information
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FISTA
impl RefUnwindSafe for FISTA
impl Send for FISTA
impl Sync for FISTA
impl Unpin for FISTA
impl UnwindSafe for FISTA
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
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