GP.sigma_clip

Contents

GP.sigma_clip#

GP.sigma_clip(p: Any, Y: Array, sigma: Any, plot: bool | None = True, use_gp_mean: bool | None = True) Array[source]#

Performs GP regression and replaces any outliers above a given number of standard deviations with the GP predictive mean evaluated at those locations. If use_gp_mean = False then will instead replace outliers with the mean function evaluated at each location.

Parameters:
  • p (PyTree) – Pytree of hyperparameters used to calculate the covariance matrix in addition to any mean function parameters which may be needed to calculate the mean function.

  • Y (JAXArray) – Observed data to fit, must be of shape (N_l, N_t).

  • sigma (Scalar) – Significance value in standard deviations above which outliers will be clipped.

  • plot (bool, optional) – Whether to produce plots which visualise the outliers in the data.

  • use_gp_mean (bool, optional) – Will replace outliers with values from the GP predictive mean if True, otherwise will replace with values from the mean function.

Returns:

The observed data with outliers cleaned.

Return type:

JAXArray