Function forust_ml::utils::constrained_weight
source · pub fn constrained_weight(
l2: &f32,
gradient_sum: f32,
hessian_sum: f32,
lower_bound: f32,
upper_bound: f32,
constraint: Option<&Constraint>
) -> f32Expand description
Calculate the constraint weight given bounds and a constraint.