40
Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Embed Size (px)

Citation preview

Page 1: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Verification of probability and ensemble forecasts

Laurence J. WilsonAtmospheric Science and Technology Branch

Environment Canada

Page 2: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Goals of this session

Increase understanding of scores used for probability forecast verification Characteristics, strengths and weaknesses

Know which scores to choose for different verification questions.

Not so specifically on R – projects.

Page 3: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Topics Introduction: review of essentials of probability

forecasts for verification Brier score: Accuracy Brier skill score: Skill Reliability Diagrams: Reliability, resolution and

sharpness Exercise

Discrimination Exercise

Relative operating characteristic Exercise

Ensembles: The CRPS and Rank Histogram

Page 4: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Probability forecast

Applies to a specific, completely defined event Examples: Probability of precipitation over

6h ….

Question: What does a probability forecast “POP for Helsinki for today (6am to 6pm) is 0.95” mean?

Page 5: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

The Brier Score Mean square error of a probability forecast

Weights larger errors more than smaller ones

Sharpness: The tendency of probability forecasts towards categorical forecasts, measured by the variance of the forecasts

A measure of a forecasting strategy; does not depend on obs

2

1

1)o(p

NBS i

N

ii

0 10.3

Page 6: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Brier Score

Gives result on a single forecast, but cannot get a perfect score unless forecast categorically.

Strictly proper A “summary” score – measures

accuracy, summarized into one value over a dataset.

Brier Score decomposition – components of the error

Page 7: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Components of probability error

The Brier score can be decomposed into 3 terms (for K probability classes and a sample of size N):

)1( )(1

)(1

2

1

2

1

oooonN

opnN

BSK

kkkk

K

kkk

reliability resolution uncertainty

If for all occasions when forecast probability pk is predicted, the observed frequency of the event is = pk then the forecast is said to be reliable. Similar to bias for a continuous variable

The ability of the forecast to distinguish situations with distinctly different frequencies of occurrence.

The variability of the observations. Maximized when the climatological frequency (base rate) =0.5 Has nothing to do with forecast quality! Use the Brier skill score to overcome this problem.

ko

The presence of the uncertainty term means that Brier Scores should not be compared on different samples.

Page 8: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Brier Skill Score

In the usual skill score format: proportion of improvement of accuracy over the accuracy of a standard forecast, climatology or persistence.

IF the sample climatology is used, can be expressed as:

ref

ref

BS

BSBS BSS

Unc

RelRes BSS

Page 9: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Brier score and components in Rlibrary(verification)

mod1 <- verify(obs = DAT$obs, pred = DAT$msc)

summary(mod1)

The forecasts are probabilistic, the observations are binary.Sample baseline calculated from observations.

1 Stn 20 StnsBrier Score (BS) = 0.08479 0.06956Brier Score - Baseline = 0.09379 0.08575Skill Score = 0.09597 0.1888 Reliability = 0.01962 0.007761 Resolution = 0.02862 0.02395 Uncertainty = 0.09379 0.08575

Page 10: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Brier Score and Skill Score - Summary

Measures accuracy and skill respectively

“Summary” scores Cautions:

Cannot compare BS on different samples BSS – take care about underlying

climatology BSS – Take care about small samples

Page 11: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Reliability Diagrams 1

A graphical method for assessing reliability, resolution, and sharpness of a probability forecast

Requires a fairly large dataset, because of the need to partition (bin) the sample into subsamples conditional on forecast probability

Sometimes called “attributes” diagram.

Page 12: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Reliability diagram 2: How to do it

1. Decide number of categories (bins) and their distribution: Depends on sample size, discreteness of forecast probabilities Should be an integer fraction of ensemble size for e.g. Don’t all have to be the same width – within bin sample should be

large enough to get a stable estimate of the observed frequency.

2. Bin the data

3. Compute the observed conditional frequency in each category (bin) k obs. relative frequencyk = obs. occurrencesk / num. forecastsk

4. Plot observed frequency vs forecast probability

5. Plot sample climatology ("no resolution" line) (The sample base rate) sample climatology = obs. occurrences / num. forecasts

6. Plot "no-skill" line halfway between climatology and perfect reliability (diagonal) lines

7. Plot forecast frequency histogram to show sharpness (or plot number of events next to each point on reliability graph)

Page 13: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Reliability Diagram 3

skill

climatology

Forecast probability

Obs

erve

d f

requ

ency

00

1

1

# f

csts

Pfcst

Reliability: Proximity to diagonal

Resolution: Variation about horizontal (climatology) line

No skill line: Where reliability and resolution are equal – Brier skill score goes to 0

Forecast probability

Obs

. fr

eque

ncy

00

1

10

Forecast probability

Obs

. fr

eque

ncy

0

1

1

clim

Reliability

Resolution

Page 14: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Reliability Diagram Exercise

Page 15: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Sharpness Histogram Exercise

Page 16: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Reliability Diagram in R

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Forecast probability, yi

Obs

erve

d re

lativ

e fr

eque

ncy,

o 1

No skill

0.15

4

0.07

2

0.06

0

0.05

9 0.05

7

0.05

7 0.05

9 0.06

4

0.12

4

0.29

3

MSC

No resolution

plot(mod1, main = names(DAT)[3], CI = TRUE )

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

Forecast probability, yi

Obs

erve

d re

lativ

e fre

quen

cy,

o1

0.25

5

0.04

7

0.03

5

0.02

7 0.03

3

0.03

3

0.03

1

0.04

5

0.06

0

0.43

3

ecmwf

No resolution

Page 17: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Brier score and components in Rlibrary(verification)

for(i in 1:4){mod1 <- verify(obs = DAT$obs, pred = DAT[,1+i])summary(mod1)}

The forecasts are probabilistic, the observations are binary.Sample baseline calculated from observations.

MSC ECMWFBrier Score (BS) = 0.2241 0.2442Brier Score - Baseline = 0.2406 0.2406Skill Score = 0.06858 -0.01494 Reliability = 0.04787 0.06325 Resolution = 0.06437 0.05965 Uncertainty = 0.2406 0.2406

Page 18: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

18

Reliability Diagram ExerciseReliability Table Exercise

You have two reliability tables, one for 0 to 6 h POP forecasts and the other for 42 to 48 h POP forecasts (6 h periods). Forecasts are for 220 Canadian stations over a three month period, January 1, to March 31, 1999. On each graph there are two lines, representing the forecasts from two different techniques. Technique A is represented in blue and Technique B in red. In the upper left corner, the histograms indicate the number of times each of the 10 probability categories was predicted. Technique A is shown on the histograms by the blue bars and Technique B by the red bars. The frequencies of prediction of each probability category are also indicated by the numbers beside the points on the graphs. The horizontal line is the sample climatological frequency of occurrence of precipitation.

Questions:

1. Comment on the reliability of the two techniques as indicated by both tables. What does a forecast of 85% actually mean at 0 to 6 h and 42 to 48 h?

2. Which technique is sharper at 0 to 6 h? at 42 to 48 h? How do you know?

3. The two extra plotted points (in green) represent categorical forecasts of precipitation from a third technique. Comment on the reliability of this method for both forecast periods.

4. Which of the two probability forecast techniques produces the better forecasts in your opinion. Why?

Page 19: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

19

Reliability Diagram Exercise

Page 20: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Reliability Diagrams - Summary

Diagnostic tool Measures “reliability”, “resolution” and

“sharpness” Requires “reasonably” large dataset to

get useful results Try to ensure enough cases in each bin Graphical representation of Brier score

components

Page 21: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Discrimination and the ROC

Reliability diagram – partitioning the data according to the forecast probability

Suppose we partition according to observation – 2 categories, yes or no

Look at distribution of forecasts separately for these two categories

Page 22: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Discrimination Discrimination: The ability of the forecast system to clearly distinguish

situations leading to the occurrence of an event of interest from those leading to the non-occurrence of the event.

Depends on: Separation of means of conditional distributions Variance within conditional distributions

forecast

freq

uenc

y

observednon-events

observedevents

forecast

freq

uenc

y

observednon-events

observedevents

forecast

freq

uenc

y

observednon-events

observedevents

(a) (b) (c)

Good discrimination Poor discrimination Good discrimination

Page 23: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Sample Likelihood Diagrams: All precipitation, 20 Cdn stns, one year.

No

Yes

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.1

0.2

0.3

0.4

0.5

Forecast

Rel

ativ

e F

requ

ency

msc

NoYes

Discrimination: The ability of the forecast system to clearly distinguish situations leading to the occurrence of an event of interest from those leading to the non-occurrence of the event.

No

Yes

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

Forecast

Re

lativ

e F

req

ue

ncy

ecmwf

NoYes

Page 24: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Relative Operating Characteristic curve: ConstructionHR – Number of correct fcsts of event/total occurrences of event

FA – Number of false alarms/total occurrences of non-event

Page 25: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Construction of ROC curve From original dataset, determine bins

Can use binned data as for Reliability diagram BUT There must be enough occurrences of the event to

determine the conditional distribution given occurrences – may be difficult for rare events.

Generally need at least 5 bins. For each probability threshold, determine HR

and FA Plot HR vs FA to give empirical ROC. Use binormal model to obtain ROC area;

recommended whenever there is sufficient data >100 cases or so.

For small samples, recommended method is that described by Simon Mason. (See 2007 tutorial)

Page 26: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Empirical ROC

Page 27: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

ROC - Interpretation

Tampere POP Forecasts 24 h and 48 h

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

False Alarm Rate

Hit

Rat

eFitted - 24h

No Discrimination

Empirical - 24h

Fitted - 48h

Empirical - 48h

Interpretation of ROC:

*Quantitative measure: Area under the curve – ROCA

*Positive if above 45 degree ‘No discrimination’ line where ROCA = 0.5

*Perfect is 1.0.

ROC is NOT sensitive to bias: It is necessarily only that the two conditional distributions are separate

* Can compare with deterministic forecast – one point

Page 28: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Discrimination Depends on:

Separation of means of conditional distributions Variance within conditional distributions

forecast

freq

uenc

y

observednon-events

observedevents

forecast

freq

uenc

y

observednon-events

observedevents

forecast

freq

uenc

y

observednon-events

observedevents

(a) (b) (c)

Good discrimination Poor discrimination Good discrimination

Page 29: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

ROC for infrequent events

For fixed binning (e.g. deciles), points cluster towards lower left corner for rare events: subdivide lowest probability bin if possible.

Remember that the ROC is insensitive to bias (calibration).

Page 30: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

ROC in R

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

ROC Curve

False Alarm Rate

Hit

Rat

e

00.1

0.20.3

0.40.5

0.6

0.7

0.8

0.9

1

msc 0.803 ( 0.813 )

roc.plot.default(DAT$obs, DAT$msc, binormal = TRUE, legend = TRUE, leg.text = "msc", plot = "both", CI = TRUE)

roc.area(DAT$obs, DAT$msc)

0.0 0.2 0.4 0.6 0.8 1.0

0.0

0.2

0.4

0.6

0.8

1.0

ROC Curve

False Alarm Rate

Hit

Rat

e

00.10.20.30.40.5

0.60.70.8

0.9

1

ecmwf 0.79 ( 0.816 )

Page 31: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Summary - ROC Measures “discrimination” Plot of Hit rate vs false alarm rate Area under the curve – by fitted model Sensitive to sample climatology – careful about

averaging over areas or time NOT sensitive to bias in probability forecasts –

companion to reliability diagram Related to the assessment of “value” of

forecasts Can compare directly the performance of

probability and deterministic forecast

Page 32: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Data considerations for ensemble verification

An extra dimension – many forecast values, one observation value Suggests data matrix format needed; columns

for the ensemble members and the observation, rows for each event

Raw ensemble forecasts are a collection of deterministic forecasts

The use of ensembles to generate probability forecasts requires interpretation. i.e. processing of the raw ensemble data matrix.

Page 33: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

PDF interpretation from ensembles

x

P (x)

x

P (x)

x

P (x)

< X

0

1

x

P (x)

< X

Discrete

“Histogram”

pdf cdf

Page 34: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Example of discrete and fitted cdf

Page 35: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

CRPS

Page 36: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Continuous Rank Probability Score

CRPS - 40 day training periodComparison with Gaussian - b1

1.4

1.9

2.4

2.9

3.4

3.9

4.4

24 48 72 96 120 144 168 192 216 240

Projection (h)

CR

PS

(d

eg

ree

s)

BMAb1-16

Gaussb1-16

BMAb1-18

Gaussb1-18

MAE mean16

MAEmean18

dxxPxPxPCRPS aa

2

)()(),(

-difference between observation and forecast, expressed as cdfs

-defaults to MAE for deterministic fcst

-flexible, can accommodate uncertain obs

Page 37: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Rank Histogram

Commonly used to diagnose the average spread of an ensemble compared to observations

Computation: Identify rank of the observation compared to ranked ensemble forecasts

Assumption: observation equally likely to occur in each of n+1 bins. (questionable?)

Interpretation:

Page 38: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Quantification of “departure from flat”

0

1000

2000

3000

24 h

0

1000

2000

3000

72 h

0

1000

2000

3000

120 h

0

1000

2000

3000

168 h

0

1000

2000

3000

216 h

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

0

500

1000

1500

2000

2500

3000

1 2N

MN

21

1 11

1

N

kk N

M

NRMSD s

Page 39: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Comments on Rank Histogram

Can quantify the “departure from flat” Not a “real” verification measure Who are the users?

Page 40: Verification of probability and ensemble forecasts Laurence J. Wilson Atmospheric Science and Technology Branch Environment Canada

Summary

Summary score: Brier and Brier Skill Partition of the Brier score

Reliability diagrams: Reliability, resolution and sharpness

ROC: Discrimination Diagnostic verification: Reliability and

ROC Ensemble forecasts: Summary score -

CRPS