Penalties¶
- class ionworkspipeline.penalties.Penalty(fun, regularizer_weight=None)¶
A penalty function that takes a dictionary of inputs and returns a value.
Parameters¶
- funcallable
The penalty function that takes a dictionary of inputs and returns a value.
- regularizer_weightfloat, optional
The weight applied to the penalty term. Default is 1.0.
Extends:
ionworkspipeline.data_fits.regularizers.regularizers.Regularizer
- class ionworkspipeline.penalties.PenaltySet(regularizers: list | tuple | ndarray, scalar_output: bool, x_to_inputs: callable, regularizer_set_weight: float | None = None)¶
A collection of penalty terms that can be evaluated together.
Parameters¶
- regularizerslist, tuple or ndarray
Collection of penalty terms.
- scalar_outputbool
Whether the set returns scalar or array outputs.
- regularizer_set_weightfloat, optional
Weight applied to the entire penalty set. Default is 1.0.
Extends:
ionworkspipeline.data_fits.regularizers.regularizers.RegularizerSet
- property base_regularizer_type¶
type: The base type for regularizers in this set.