lsst.scarlet.lite gee10cc3b42+43dac7135f
|
Public Member Functions | |
__init__ (self, np.ndarray x, dict[str, np.ndarray] helpers, Callable|float step, Callable|None grad=None, Callable|None prox=None) | |
float | step (self) |
tuple[int,...] | shape (self) |
npt.DTypeLike | dtype (self) |
Parameter | copy (self) |
update (self, int it, np.ndarray input_grad, *args) | |
resize (self, Box old_box, Box new_box) | |
Public Attributes | |
x | |
helpers | |
grad | |
prox | |
Protected Attributes | |
_step | |
A parameter in a `Component` Parameters ---------- x: The array of values that is being fit. helpers: A dictionary of helper arrays that are used by an optimizer to persist values like the gradient of `x`, the Hessian of `x`, etc. step: A numerical step value or function to calculate the step for a given `x``. grad: A function to calculate the gradient of `x`. prox: A function to take the proximal operator of `x`.
Parameter lsst.scarlet.lite.parameters.Parameter.copy | ( | self | ) |
Copy this parameter, including all of the helper arrays.
npt.DTypeLike lsst.scarlet.lite.parameters.Parameter.dtype | ( | self | ) |
The numpy dtype of the array that is being fit.
Grow the parameter and all of the helper parameters Parameters ---------- old_box: The old bounding box for the parameter. new_box: The new bounding box for the parameter.
tuple[int, ...] lsst.scarlet.lite.parameters.Parameter.shape | ( | self | ) |
The shape of the array that is being fit.
float lsst.scarlet.lite.parameters.Parameter.step | ( | self | ) |
Calculate the step Return ------ step: The numerical step if no iteration is given.
lsst.scarlet.lite.parameters.Parameter.update | ( | self, | |
int | it, | ||
np.ndarray | input_grad, | ||
* | args ) |
Update the parameter in one iteration. This includes the gradient update, proximal update, and any meta parameters that are stored as class attributes to update the parameter. Parameters ---------- it: The current iteration input_grad: The gradient from the full model, passed to the parameter.
Reimplemented in lsst.scarlet.lite.parameters.FistaParameter, lsst.scarlet.lite.parameters.AdaproxParameter, and lsst.scarlet.lite.parameters.FixedParameter.