environmentaltools.spatiotemporal.bme.calculate_moments

environmentaltools.spatiotemporal.bme.calculate_moments(zh, zs, vs, nhs, BsIFh, KsIFh, BkIFhs, KkIFhs, options)[source]

Calculate moments of the BME posterior probability density function.

Computes statistical moments (mean, variance, skewness) of the posterior distribution using numerical integration over soft data intervals.

Parameters:
  • zh (np.ndarray) – Hard data values.

  • zs (np.ndarray) – Soft data mean values.

  • vs (np.ndarray) – Soft data variance values.

  • nhs (list of int) – Number of hard and soft data points [n_hard, n_soft].

  • BsIFh (np.ndarray) – BME coefficient matrix for soft data given hard data.

  • KsIFh (np.ndarray) – BME covariance matrix for soft data given hard data.

  • BkIFhs (np.ndarray) – BME coefficient matrix for estimation point given all data.

  • KkIFhs (float) – BME covariance at estimation point given all data.

  • options (list) – Integration options [max_intervals, num_moments, percentile].

Returns:

(probability, mean, std_dev, skewness) - Four moments of the posterior PDF.

Return type:

tuple of float

Notes

Uses trapezoidal rule for numerical integration over soft data probability intervals defined by the specified percentile bounds.