BoundEvaluator
- class pmrf.terms.BoundEvaluator(evaluator: AbstractEvaluator, frequency: Any, weight: float = 1.0)
Bases:
AbstractTermBinds an evaluator to the frequency sweep it should be evaluated over.
Evaluators take frequency as input, meaning the same evaluator can be re-used over different sweeps. Binding one to a particular sweep creates a term, which can then be summed by a
pmrf.SummedTerms. Several evaluators can therefore be bound to different sweeps and solved together, allowing a single set of model parameters to be fitted over multiple bands at once.- Parameters:
evaluator (pmrf.evaluators.AbstractEvaluator) – The operator (e.g. a Loss or Likelihood) to evaluate.
frequency (pmrf.frequency.Frequency) – The frequency range or points to evaluate the operator over.
weight (float) – A scaling factor applied to this term’s contribution to the total.
- __call__(model: Model, **kwargs) Array
Evaluate the model.
- Parameters:
model (Model) – The model instance to evaluate.
**kwargs (dict) – Additional keyword arguments for the evaluation process.
- Returns:
The evaluated result.
- Return type:
jnp.ndarray
- evaluator: AbstractEvaluator
The active evaluator.
- weight: float = 1.0
The relative weight of this term.