Skip to content

v0.2.0

Latest

Choose a tag to compare

@tomsail tomsail released this 28 Sep 12:51
· 8 commits to main since this release
efcf4c1

seastats 0.2.0

Renamed metrics (issue #19)

Old names still work: the functions emit a DeprecationWarning, and old metric
strings passed to get_stats() are mapped to the new key and emit a
FutureWarning. Note the returned dictionary uses the new keys.

old key new key old function new function meaning
bias mb get_bias() get_mb() Mean Bias
rmse rmsd get_rmse() get_rmsd() Root Mean Square Difference
rms urmsd get_rms() get_urmsd() Unbiased (centered) RMSD
cr cc get_corr() get_cc() Pearson Correlation Coefficient

New metrics (issue #20)

key function meaning
vs get_vs() Variance Similarity (Koh et al., 2012), unitless, 0 → 1, 1 = equal variances
vd get_vd() Variance Dissimilarity, signed −1 → +1, 0 = equal variances, positive when var(sim) > var(obs)

Formulas:

  • vs = (σ_sim · σ_obs) / (0.5 · (σ_sim² + σ_obs²)), NaN if both variances are 0
  • vd = sign(σ_sim − σ_obs) · (1 − vs)

Unchanged keys

mae, mse, sim_mean, obs_mean, sim_std, obs_std, nse, lambda,
slope, intercept, slope_pp, intercept_pp, mad, madp, madc, kge,
and all storm metrics (R1*, R3*, error*).

Defaults

GENERAL_METRICS = ["mb", "urmsd", "rmsd", "cc", "nse", "kge", "vs", "vd"]

vs and vd were also added to GENERAL_METRICS_ALL.

Other changes

  • New runtime dependency deprecated (plus types-deprecated for mypy).
  • Version bumped 0.1.2 → 0.2.0; lockfile and requirements/ regenerated.
  • Tests updated to the new keys, with added coverage for the deprecation shims.
  • README metric lists and formula headings updated.