pysteps.verification#

Methods for verification of deterministic, probabilistic and ensemble forecasts.

pysteps.verification.interface#

Interface for the verification module.

get_method(name[, type])

Return a callable function for the method corresponding to the given verification score.

pysteps.verification.detcatscores#

Forecast evaluation and skill scores for deterministic categorial (dichotomous) forecasts.

det_cat_fct(pred, obs, thr[, scores, axis])

Calculate simple and skill scores for deterministic categorical (dichotomous) forecasts.

det_cat_fct_init(thr[, axis])

Initialize a contingency table object.

det_cat_fct_accum(contab, pred, obs)

Accumulate the frequency of "yes" and "no" forecasts and observations in the contingency table.

det_cat_fct_merge(contab_1, contab_2)

Merge two contingency table objects.

det_cat_fct_compute(contab[, scores])

Compute simple and skill scores for deterministic categorical (dichotomous) forecasts from a contingency table object.

pysteps.verification.detcontscores#

Forecast evaluation and skill scores for deterministic continuous forecasts.

det_cont_fct(pred, obs[, scores, axis, ...])

Calculate simple and skill scores for deterministic continuous forecasts.

det_cont_fct_init([axis, conditioning, thr])

Initialize a verification error object.

det_cont_fct_accum(err, pred, obs)

Accumulate the forecast error in the verification error object.

det_cont_fct_merge(err_1, err_2)

Merge two verification error objects.

det_cont_fct_compute(err[, scores])

Compute simple and skill scores for deterministic continuous forecasts from a verification error object.

pysteps.verification.ensscores#

Evaluation and skill scores for ensemble forecasts.

ensemble_skill(X_f, X_o, metric, **kwargs)

Compute mean ensemble skill for a given skill metric.

ensemble_spread(X_f, metric, **kwargs)

Compute mean ensemble spread for a given skill metric.

rankhist(X_f, X_o[, X_min, normalize])

Compute a rank histogram counts and optionally normalize the histogram.

rankhist_init(num_ens_members[, X_min])

Initialize a rank histogram object.

rankhist_accum(rankhist, X_f, X_o)

Accumulate forecast-observation pairs to the given rank histogram.

rankhist_compute(rankhist[, normalize])

Return the rank histogram counts and optionally normalize the histogram.

pysteps.verification.lifetime#

Estimation of precipitation lifetime from a decaying verification score function (e.g. autocorrelation function).

lifetime(X_s, X_t[, rule])

Compute the average lifetime by integrating the correlation function as a function of lead time.

lifetime_init([rule])

Initialize a lifetime object.

lifetime_accum(lifetime, X_s, X_t)

Compute the lifetime by integrating the correlation function and accumulate the result into the given lifetime object.

lifetime_compute(lifetime)

Compute the average value from the lifetime object.

pysteps.verification.plots#

Methods for plotting verification results.

plot_intensityscale(intscale[, fig, ...])

Plot a intensity-scale verification table with a color bar and axis labels.

plot_rankhist(rankhist[, ax])

Plot a rank histogram.

plot_reldiag(reldiag[, ax])

Plot a reliability diagram.

plot_ROC(ROC[, ax, opt_prob_thr])

Plot a ROC curve.

pysteps.verification.probscores#

Evaluation and skill scores for probabilistic forecasts.

CRPS(X_f, X_o)

Compute the continuous ranked probability score (CRPS).

CRPS_init()

Initialize a CRPS object.

CRPS_accum(CRPS, X_f, X_o)

Compute the average continuous ranked probability score (CRPS) for a set of forecast ensembles and the corresponding observations and accumulate the result to the given CRPS object.

CRPS_compute(CRPS)

Compute the averaged values from the given CRPS object.

reldiag(P_f, X_o, X_min[, n_bins, min_count])

Compute the x- and y- coordinates of the points in the reliability diagram.

reldiag_init(X_min[, n_bins, min_count])

Initialize a reliability diagram object.

reldiag_accum(reldiag, P_f, X_o)

Accumulate the given probability-observation pairs into the reliability diagram.

reldiag_compute(reldiag)

Compute the x- and y- coordinates of the points in the reliability diagram.

ROC_curve(P_f, X_o, X_min[, n_prob_thrs, ...])

Compute the ROC curve and its area from the given ROC object.

ROC_curve_init(X_min[, n_prob_thrs])

Initialize a ROC curve object.

ROC_curve_accum(ROC, P_f, X_o)

Accumulate the given probability-observation pairs into the given ROC object.

ROC_curve_compute(ROC[, compute_area])

Compute the ROC curve and its area from the given ROC object.

pysteps.verification.salscores#

The Spatial-Amplitude-Location (SAL) score by [WPHF08].

sal(prediction, observation[, thr_factor, ...])

Compute the Structure-Amplitude-Location (SAL) spatial verification metric.

sal_structure(prediction, observation[, ...])

Compute the structure component for SAL based on [WPHF08].

sal_amplitude(prediction, observation)

Compute the amplitude component for SAL based on [WPHF08].

sal_location(prediction, observation[, ...])

Compute the first parameter of location component for SAL based on [WPHF08].

pysteps.verification.spatialscores#

Skill scores for spatial forecasts.

intensity_scale(X_f, X_o, name, thrs[, ...])

Compute an intensity-scale verification score.

intensity_scale_init(name, thrs[, scales, ...])

Initialize an intensity-scale verification object.

intensity_scale_accum(intscale, X_f, X_o)

Compute and update the intensity-scale verification scores.

intensity_scale_merge(intscale_1, intscale_2)

Merge two intensity-scale verification objects.

intensity_scale_compute(intscale)

Return the intensity scale matrix.

binary_mse(X_f, X_o, thr[, wavelet, ...])

Compute the MSE of the binary error as a function of spatial scale.

binary_mse_init(thr[, wavelet])

Initialize a binary MSE (BMSE) verification object.

binary_mse_accum(bmse, X_f, X_o)

Accumulate forecast-observation pairs to an BMSE object.

binary_mse_merge(bmse_1, bmse_2)

Merge two BMSE objects.

binary_mse_compute(bmse[, return_scales])

Compute the BMSE.

fss(X_f, X_o, thr, scale)

Compute the fractions skill score (FSS) for a deterministic forecast field and the corresponding observation field.

fss_init(thr, scale)

Initialize a fractions skill score (FSS) verification object.

fss_accum(fss, X_f, X_o)

Accumulate forecast-observation pairs to an FSS object.

fss_merge(fss_1, fss_2)

Merge two FSS objects.

fss_compute(fss)

Compute the FSS.