Protocol class for computing the error (residual) between data and a model prediction given a set of parameters.
Classes that implement this protocol typically will concerned with implementing a residual/likelihood function for a certain type of data. The protocol is intentitionally left to be simple to implement while enabling flexibility to implement additional methods and attributes for performance and debugging purposes.
Parameters
Name
Type
Description
Default
database
Database
required
datasets
PickleableTinyDB
The candidate datasets for the a contribution. Usually the datasets are a superset (in components, phases, data types, etc.) of the actual data used to compute the residual for any particular contribution.
required
phase_models
PhaseModels
Defines the active set of components that should be fit and any user-provided overrides to the PyCalphad Model class for each phase.
required
symbols_to_fit
Optional[List[SymbolName]]
User-provided symbols to fit. By default, the symbols to fit should be set by espei.utils.database_symbols_to_fit.
None
weight
Optional[float]
When computing the likelihood, this should be used to modify the probability distribution. Higher weights should correspond to narrower probability distributions, but it’s exact use will depend on the particular probability distribution.