penalty

SeparableModelResult.penalty(fvars)

Penalty function for scalar minimizers.

Parameters:fvars (numpy.ndarray) – Array of values for the variable parameters.
Returns:r – The evaluated user-supplied objective function.

If the objective function is an array of size greater than 1, use the scalar returned by self.reduce_fcn. This defaults to sum-of-squares, but can be replaced by other options.

Return type:float