pmrf.fitting.SciPyMinimizeFitter
- class pmrf.fitting.SciPyMinimizeFitter(model, *, cost_kind=None, cost_function=None, **kwargs)[source]
Bases:
FrequentistFitterSciPy Minimize: Classical optimization using
scipy.optimize.minimize.- Parameters:
model (Model)
cost_kind (str | None)
cost_function (Callable[[Array], Array] | list[Callable[[Array], Array]] | Module | None)
- __init__(model, *, cost_kind=None, cost_function=None, **kwargs)
Initializes the FrequentistFitter.
- Parameters:
model (Model) – The parametric pmrf Model to be fitted.
cost_kind (str, optional) – A cost ‘kind’ alias to initialize the features and cost function from. Can be one of ‘convolutional’, ‘complex’, ‘magnitude’ or None.
cost_function (ArrayFuncT, list[ArrayFuncT] or eqx.Module, optional) – A function or sequence of functions defining the cost metric. If a list of functions is provided, they are composed sequentially. If None, then cost_kind defines the cost function. Defaults to None.
**kwargs – Additional arguments forwarded to
BaseFitter.
- Return type:
None
Methods
__delattr__(name, /)Implement delattr(self, name).
__dir__()Default dir() implementation.
__eq__(value, /)Return self==value.
__format__(format_spec, /)Default object formatter.
__ge__(value, /)Return self>=value.
__getattribute__(name, /)Return getattr(self, name).
__gt__(value, /)Return self>value.
__hash__()Return hash(self).
__init__(model, *[, cost_kind, cost_function])Initializes the FrequentistFitter.
__init_subclass__This method is called when a class is subclassed.
__le__(value, /)Return self<=value.
__lt__(value, /)Return self<value.
__ne__(value, /)Return self!=value.
__new__(**kwargs)__reduce__()Helper for pickle.
__reduce_ex__(protocol, /)Helper for pickle.
__repr__()Return repr(self).
__setattr__(name, value, /)Implement setattr(self, name, value).
__sizeof__()Size of object in memory, in bytes.
__str__()Return str(self).
__subclasshook__Abstract classes can override this to customize issubclass().
_create_context(measured, *[, cost_kind, ...])Create a FrequentistContext for the fitting process.
_run_algorithm(ctx, *[, optimizer, ...])Executes the optimization using SciPy.
_run_context(context, *[, load_previous, ...])Executes the fitting context.
fit(measured, **kwargs)Fits the model to measured data.
fit_submodels(measured, **kwargs)Fits the submodels.
Attributes
__abstractmethods____annotations____dict____doc____module____slots____weakref__list of weak references to the object (if defined)
_abc_impl