stacie.conditioning module¶
Cost function pre-conditioning.
- class ConditionedCost(cost, par_scales, cost_scale)[source]¶
Bases:
object
A wrapper for the cost function taking care of pre-conditioning.
The goal of the pre-conditioner is to let the optimizer work with normalized parameters, and to scale the cost function to a normalized range, such that all quantities are close to 1, even if the spectra and the frequencies have very different orders of magnitude.
- Parameters:
-
cost:
Callable
[[ndarray
[tuple
[Any
,...
],dtype
[float
]],int
],list
[ndarray
[tuple
[Any
,...
],dtype
[float
]]]]¶