@@ -40,7 +40,9 @@ def det_cont_fct(pred, obs, scores="", axis=None, conditioning=None, thr=0.0):
4040 +------------+--------------------------------------------------------+
4141 | Name | Description |
4242 +============+========================================================+
43- | beta | linear regression slope (conditional bias) |
43+ | beta1 | linear regression slope (type 1 conditional bias) |
44+ +------------+--------------------------------------------------------+
45+ | beta2 | linear regression slope (type 2 conditional bias) |
4446 +------------+--------------------------------------------------------+
4547 | corr_p | pearson's correleation coefficien (linear correlation) |
4648 +------------+--------------------------------------------------------+
@@ -98,6 +100,12 @@ def det_cont_fct(pred, obs, scores="", axis=None, conditioning=None, thr=0.0):
98100 Note that "scatter" is the only score that will be computed in dB units of
99101 the multiplicative error, i.e.: 10*log10(pred/obs).
100102
103+ beta1 measures the degree of conditional bias of the observations given the
104+ forecasts (type 1).
105+
106+ beta2 measures the degree of conditional bias of the forecasts given the
107+ observations (type 2).
108+
101109 The normalized MSE is computed as NMSE = E[(pred - obs)^2]/E[(pred + obs)^2].
102110
103111 The debiased RMSE is computed as DRMSE = sqrt(RMSE - ME^2).
@@ -116,6 +124,10 @@ def det_cont_fct(pred, obs, scores="", axis=None, conditioning=None, thr=0.0):
116124 precipitation measurement in a mountainous region. Q.J.R. Meteorol. Soc.,
117125 132: 1669-1692. doi:10.1256/qj.05.190
118126
127+ Potts, J. (2012), Chapter 2 - Basic concepts. Forecast verification: a
128+ practitioner’s guide in atmospheric sciences, I. T. Jolliffe, and D. B.
129+ Stephenson, Eds., Wiley-Blackwell, 11–29.
130+
119131 See also
120132 --------
121133
@@ -420,7 +432,9 @@ def det_cont_fct_compute(err, scores=""):
420432 +------------+--------------------------------------------------------+
421433 | Name | Description |
422434 +============+========================================================+
423- | beta | linear regression slope (conditional bias) |
435+ | beta1 | linear regression slope (type 1 conditional bias) |
436+ +------------+--------------------------------------------------------+
437+ | beta2 | linear regression slope (type 2 conditional bias) |
424438 +------------+--------------------------------------------------------+
425439 | corr_p | pearson's correleation coefficien (linear correlation) |
426440 +------------+--------------------------------------------------------+
@@ -496,10 +510,15 @@ def get_iterable(x):
496510 corr_p = err ["cov" ] / np .sqrt (err ["vobs" ]) / np .sqrt (err ["vpred" ])
497511 result ["corr_p" ] = corr_p
498512
499- # beta (linear regression slope)
500- if score_ in ["beta" , "" ]:
501- beta = err ["cov" ] / err ["vpred" ]
502- result ["beta" ] = beta
513+ # beta1 (linear regression slope)
514+ if score_ in ["beta" , "beta1" , "" ]:
515+ beta1 = err ["cov" ] / err ["vpred" ]
516+ result ["beta1" ] = beta1
517+
518+ # beta2 (linear regression slope)
519+ if score_ in ["beta2" , "" ]:
520+ beta2 = err ["cov" ] / err ["vobs" ]
521+ result ["beta2" ] = beta2
503522
504523 # debiased RMSE
505524 if score_ in ["drmse" , "" ]:
0 commit comments