Enum rusty_machine::learning::toolkit::regularization::Regularization
[−]
[src]
pub enum Regularization<T: Float> { L1(T), L2(T), ElasticNet(T, T), None, }
Model Regularization
Variants
L1(T)
L1 Regularization
L2(T)
L2 Regularization
ElasticNet(T, T)
Elastic Net Regularization (L1 and L2)
None
No Regularization
Methods
impl<T: Float + FromPrimitive> Regularization<T>
[src]
fn reg_cost(&self, mat: MatrixSlice<T>) -> T
Compute the regularization addition to the cost.
fn reg_grad(&self, mat: MatrixSlice<T>) -> Matrix<T>
Compute the regularization addition to the gradient.
Trait Implementations
impl<T: Debug + Float> Debug for Regularization<T>
[src]
impl<T: Clone + Float> Clone for Regularization<T>
[src]
fn clone(&self) -> Regularization<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more