Linear Regression
Simon [email protected]
Seasonal Forecasting Using the Climate Predictability ToolBangkok, Thailand, 12 – 16 January 2015
2 Seasonal Forecasting Using the Climate Predictability Tool
Seasonal prediction
How do we know how the oceans will affect the weather?– How have they affected it in the past?– What causes them to have an effect?
3 Seasonal Forecasting Using the Climate Predictability Tool
Seasonal forecasting I: empirical
Area-average MAM rainfall for 10° – 20°N, 98° – 105°E (Thailand)
4 Seasonal Forecasting Using the Climate Predictability Tool
Ocean-based ENSO Indices
Niño1+2 0°–10°S, 90°W–80°WNiño3 5°N–5°S, 150°W–90°WNiño3.4 5°N–5°S, 170°W–120°WNiño4 5°N–5°S, 160°E–150°W
Niño5 5°N–5°S, 120°E–140°ENiño6 16°N–8°N, 140°E–160°E
5 Seasonal Forecasting Using the Climate Predictability Tool
Seasonal forecasting I: empirical
MAM rainfall, and NIÑO4 SSTs (5°S – 5°N, 160°E – 150°W).
6 Seasonal Forecasting Using the Climate Predictability Tool
Seasonal forecasting I: empirical
MAM rainfall, and NIÑO4 SSTs (5°S – 5°N, 160°E – 150°W).
7 Seasonal Forecasting Using the Climate Predictability Tool
We can use simple linear regression to predict rainfall using a single predictor such as NIÑO4.
Feb NIÑO4 SSTs as a predictor of MAM rainfall over Thailand
Linear regression
0 1
0
1
ˆ NINO4
340 mm
50
y
0.48r
8 Seasonal Forecasting Using the Climate Predictability Tool
Forecasting vs describing
• The correlation (-0.48) does not tell us how well good the forecasts will be; it tells us how well we can describe the past relationship.
• The goodness index estimates how good the forecasts will be rather than how well the historical relationship is described. (NB. We want the goodness index to be positive, because it compares the observations with the forecasts. However, the correlation correlation with the predictor can be positive or negative.)
9 Seasonal Forecasting Using the Climate Predictability Tool
Cross-validationLeave-one-out cross-validation
1971 Predict 1971
Training period
1972 Training period
Predict 1972
Training Period
1973 Training period
Predict 1973
Training period
1974 Training period
Predict 1974
Training Period
1975 Training period
Predict 1975
Training period
… repeat to 2010.
Leave-k-out cross-validation 1971
Predict 1971
Omit 1972
Omit 1973
Training period
1972 Omit 1971
Predict 1972
Omit 1973
Omit 1974
Training period
1973 Omit 1971
Omit 1972
Predict 1973
Omit 1974
Omit 1975
Training period
1974 Training period
Omit 1972
Omit 1973
Predict 1974
Omit 1975
Omit 1976
Training period
1975 Training period
Omit 1973
Omit 1974
Predict 1975
Omit 1976
Omit 1977
10 Seasonal Forecasting Using the Climate Predictability Tool
Seasonal prediction
How do we know how the oceans will affect the weather?– How have they affected it in the past?– What causes them to have an effect?
11 Seasonal Forecasting Using the Climate Predictability Tool
Seasonal forecasting II: dynamical
• ECHAM4.5 MAM rainfall for Thailand from Feb (purple).
0.32r
12 Seasonal Forecasting Using the Climate Predictability Tool
Seasonal forecasting II: dynamical
• ECHAM4.5 rainfall for 21° – 27°N, 88° – 93°E (Bangladesh)
13 Seasonal Forecasting Using the Climate Predictability Tool
Summary
• A simple linear regression equation for predicting rainfall has two parameters:– constant: how much rainfall can we expect on average
when the value of the predictor is 0.– coefficient: how much can we expect rainfall to increase or
decrease when the predictor increases by 1.• How well we can describe a historical relationship is not the
same as how well we can predict future values. We have to test the predictions using independent data.
• We can use regression to correct (“recalibrate”) dynamical model predictions.
14 Seasonal Forecasting Using the Climate Predictability Tool
Exercise
• Select a season of interest and download ENSO indices for that season. How strongly related to Thailand rainfall is ENSO? Compare the goodness index with the correlation.
• Repeat using successively earlier ENSO values (e.g., MAM from Feb, Jan, Dec etc.). How much does the skill weaken?
• Repeat using different rainfall seasons. How well can we predict rainfall for Thailand for different seasons?
• Repeat for the best predictors using the gridded data or your own station data for Thailand as predictands. Where is the correlation strongest, and at what time of year?