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 ParameterVector and FieldRequest objects stored in parameters and fields instance variables.

The names of the unpacked keyword arguments correspond to the name attribute of the ParameterVector and FieldRequest objects, 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 FieldRequest specifying the field and coordinates to which the Gaussian prior will be applied. If specified, field_positions will override any values passed to the parameters arguments.

  • parameter_vector (ParameterVector) – A ParameterVector specifying 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 CovarianceFunction class from the inference-tools package.

  • mean (MeanFunction) – An instance of a MeanFunction class from the inference-tools package.

  • field_positions (FieldRequest) – A FieldRequest specifying the field and coordinates which will be used to construct the GP prior. If specified, field_positions will override any values passed to the parameters or parameter_coordinates arguments.

  • parameters (Parameters) – A ParameterVector specifying 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 str to coordinate values as numpy.ndarray) corresponding the ParameterVector passed to the parameters argument.