Built-in prior distributions
- class midas.priors.BasePrior
- abstractmethod probability(**parameters_and_fields)
Calculate the prior log-probability.
- Parameters:
parameters_and_fields (ndarray) –
The parameter and field values requested via the
ParameterVectorandFieldRequestobjects stored inparametersandfieldsinstance variables.The names of the unpacked keyword arguments correspond to the
nameattribute of theParameterVectorandFieldRequestobjects, and their values will be passed as 1D arrays.- Returns:
The prior log-probability value.
- Return type:
float
- class midas.priors.GaussianPrior(name, mean, standard_deviation, field_positions=None, parameter_vector=None)
Specify a Gaussian prior over either a series of field values, or a set of parameters.
- Parameters:
name (str) – The name used to identify the Gaussian prior
mean (ndarray) – The mean of the Gaussian prior corresponding to each parameter or requested field value.
standard_deviation (ndarray) – The standard deviation of the Gaussian prior corresponding to each parameter or requested field value.
field_positions (FieldRequest) – A
FieldRequestspecifying the field and coordinates to which the Gaussian prior will be applied. If specified,field_positionswill override any values passed to theparametersarguments.parameter_vector (ParameterVector) – A
ParameterVectorspecifying which parameters to which the Gaussian prior will be applied.
- class midas.priors.GaussianProcessPrior(name, covariance=<inference.gp.covariance.SquaredExponential object>, mean=<inference.gp.mean.ConstantMean object>, field_positions=None, parameters=None, parameter_coordinates=None)
Specify a Gaussian process prior over either a series of field values, or a set of parameters and corresponding spatial coordinates.
- Parameters:
name (str) – The name used to identify the GP prior.
covariance (CovarianceFunction) – An instance of a
CovarianceFunctionclass from theinference-toolspackage.mean (MeanFunction) – An instance of a
MeanFunctionclass from theinference-toolspackage.field_positions (FieldRequest) – A
FieldRequestspecifying the field and coordinates which will be used to construct the GP prior. If specified,field_positionswill override any values passed to theparametersorparameter_coordinatesarguments.parameters (Parameters) – A
ParameterVectorspecifying which parameters will be used as inputs to the GP prior.parameter_coordinates (dict[str, ndarray]) – A set of coordinates (a dictionary mapping coordinate names as
strto coordinate values asnumpy.ndarray) corresponding theParameterVectorpassed to theparametersargument.