Priors¶
Prior classes for adding prior probability distributions to objective functions.
Classes¶
- class ionworkspipeline.data_fits.objective_functions.regularizers.Prior(name: str | list[str] | ndarray | tuple, distribution: Distribution, regularizer_weight=None)¶
A 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.objective_functions.regularizers.regularizers.Regularizer- evaluate_to_array(inputs: dict) ndarray¶
Evaluate the regularizer function with dictionary inputs, returning an array.
Parameters¶
- inputsdict
Dictionary of input values.
Returns¶
- ndarray
Array containing the regularizer value.
- class ionworkspipeline.data_fits.objective_functions.regularizers.PriorSet(priors: list[Prior], x_to_inputs: callable, regularizer_set_weight=None)¶
A collection of prior terms that can be evaluated together.
Parameters¶
- priorslist[Prior]
Collection of prior terms.
- x_to_inputscallable
Function converting parameter vectors to input dictionaries.
- regularizer_set_weightfloat, optional
Weight applied to the entire prior set. Default is 1.0.
Extends:
ionworkspipeline.data_fits.objective_functions.regularizers.regularizers.RegularizerSet- property base_regularizer_type¶
type: The base type for regularizers in this set.