bounded_least_squares

Function bounded_least_squares 

Source
pub fn bounded_least_squares<F, J, D, S1, S2>(
    residuals: F,
    x0: &ArrayBase<S1, Ix1>,
    bounds: Option<Bounds>,
    jacobian: Option<J>,
    data: &ArrayBase<S2, Ix1>,
    options: Option<BoundedOptions>,
) -> OptimizeResult<OptimizeResults<f64>>
where F: Fn(&[f64], &[D]) -> Array1<f64>, J: Fn(&[f64], &[D]) -> Array2<f64>, D: Clone, S1: Data<Elem = f64>, S2: Data<Elem = D>,
Expand description

Solve a bounded least squares problem

This function minimizes the sum of squares of residuals subject to box constraints on the variables.

ยงArguments

  • residuals - Function that returns the residuals
  • x0 - Initial guess for the parameters
  • bounds - Optional bounds on variables
  • jacobian - Optional Jacobian function
  • data - Additional data to pass to residuals and jacobian
  • options - Options for the optimization