climepi.epimod.ParameterizedSuitabilityModel.construct_suitability_table#

ParameterizedSuitabilityModel.construct_suitability_table(*, temperature_vals, precipitation_vals=None, num_samples=None)[source]#

Construct a suitability table based on the fitted parameters.

Note that this method requires that the model has been fitted to data using fit_temperature_responses() before it can be called. The suitability table is retained as an attribute of the ParameterizedSuitabilityModel instance (which can be accessed via the suitability_table attribute), and a copy is also returned.

Parameters:
  • temperature_vals (array-like) – Vector of temperature values for which the suitability is to be computed. Must be provided.

  • precipitation_vals (array-like) – Vector of precipitation values for which the suitability is to be computed. Only needed for models that depend on precipitation.

  • num_samples (int, optional) – Number of samples to draw from the posterior distribution of the fitted parameters. If None, all samples are used.

Returns:

xarray.Dataset – A dataset containing the suitability values for the specified temperature and precipitation values, and for each posterior sample.