pub struct Optimizer<F>{ /* private fields */ }
Expand description
Implementations§
source§impl<F> Optimizer<F>
impl<F> Optimizer<F>
pub fn new(data: Matrix, func: F) -> Self
sourcepub fn get_domain(&self) -> Vec<f64>
pub fn get_domain(&self) -> Vec<f64>
Get domain
sourcepub fn get_hyperparam(&self, key: &str) -> Option<&f64>
pub fn get_hyperparam(&self, key: &str) -> Option<&f64>
Get hyperparameter (learning rate or lambda or etc.)
sourcepub fn set_init_param(&mut self, p: Vec<f64>) -> &mut Self
pub fn set_init_param(&mut self, p: Vec<f64>) -> &mut Self
Set initial parameter
sourcepub fn set_max_iter(&mut self, n: usize) -> &mut Self
pub fn set_max_iter(&mut self, n: usize) -> &mut Self
Set maximum iteration
sourcepub fn set_method(&mut self, method: OptMethod) -> &mut Self
pub fn set_method(&mut self, method: OptMethod) -> &mut Self
Set optimization method
sourcepub fn set_lambda_init(&mut self, lambda_init: f64) -> &mut Self
pub fn set_lambda_init(&mut self, lambda_init: f64) -> &mut Self
Set initial lambda for LevenbergMarquardt
sourcepub fn set_lambda_max(&mut self, lambda_max: f64) -> &mut Self
pub fn set_lambda_max(&mut self, lambda_max: f64) -> &mut Self
Set maximum lambda for LevenbergMarquardt
Auto Trait Implementations§
impl<F> Freeze for Optimizer<F>
impl<F> RefUnwindSafe for Optimizer<F>where
F: RefUnwindSafe,
impl<F> Send for Optimizer<F>where
F: Send,
impl<F> Sync for Optimizer<F>where
F: Sync,
impl<F> Unpin for Optimizer<F>
impl<F> UnwindSafe for Optimizer<F>where
F: UnwindSafe,
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> 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