Manuscript Offprint
arXiv:2610.38211RainCheck: Harnessing Historical Weather Data with Machine Learning for Rainfall Forecasting in Bangladesh
Abstract
Machine-learning rainfall forecasts are often evaluated by shuffling station records into random training and test sets. For rainfall, this lets a model see what happened at neighbouring stations on the very day it is asked to forecast, and it hides the fact that a seasonal lookup table already explains most of the variance. We quantify both effects on 618,650 station-days from 35 Bangladesh Meteorological Department stations (1948–2014). We compare random, temporal (train 1999, test 2005–2014) and spatio-temporal (unseen stations and unseen years) evaluation, calendar-only versus antecedent-rainfall features, and six learners against climatology, persistence and SARIMA. Three findings stand out. First, a station-month climatology alone classifies high-rainfall months with 88.4% accuracy (AUC 0.950), and no learner improved on it by more than 0.8 points under temporal evaluation. Second, a calendar-only random forest reached a next-day wet-day AUC of 0.889 under a random split, higher than any model with real predictors under temporal evaluation, yet fell to 0.835, below climatology (0.859), on future years. Third, models with lagged rainfall add genuine but modest skill for next-day forecasts: a Brier skill score of 0.074 (95% CI 0.064–0.088) over climatology, rising to 0.091 when station and year inputs are removed and to 0.131 when other stations' same-day observations are added. A GRU sequence model matches but does not exceed gradient boosting, and skill disappears beyond a two-day lead. For monthly totals, no learner beat climatology significantly. We release a leakage-aware protocol and code so that future
station-based studies report skill against climatology on held-out years.
1. Introduction
Bangladesh receives most of its annual rainfall during the June–September monsoon, and both excess and deficit rainfall have large consequences for floods, agriculture and public health (Shahid, 2010; Karim et al., 2020). Station records from the Bangladesh Meteorological Department (BMD) are freely available for several decades (Redikod), and studies have trained standard learners such as linear models, -nearest neighbours, decision trees, random forests and support vector machines on such records. Comparable studies in other countries report high accuracies for daily or monthly rainfall (Cramer et al., 2017; Ridwan et al., 2021; Pham et al., 2020; Liyew & Melese, 2021; Barrera-Animas et al., 2022; Rahman et al., 2022).
These numbers are hard to interpret for two reasons. The first is the evaluation split. When station-days are shuffled into training and test sets, the training set contains the same calendar day at other stations. Because rainfall is spatially correlated (the median correlation of same-day rainfall between two BMD stations is 0.31, and 0.51 for rain/no-rain occurrence in our data), a model that only sees the station identity and the date can recover part of the answer from neighbouring stations. This is a form of data leakage (Kaufman et al., 2012; Kapoor & Narayanan, 2023), and random cross-validation is known to overstate skill for temporally and spatially structured data (Bergmeir & Benítez, 2012; Roberts et al., 2017; Ploton et al., 2020; Cerqueira et al., 2020). The second reason is the reference forecast. Rainfall in Bangladesh has a strong seasonal cycle, so a large share of the variance in monthly totals, and much of the separation between “high” and “low” rainfall cases, can be obtained by simply forecasting the long-term average for that station and time of year. Forecast verification therefore reports skill relative to climatology rather than raw accuracy (Murphy, 1988; 1993; Wilks, 2019).
A common setup trains learners on calendar inputs alone (station, year, month, day), evaluates them on a random split, and reports accuracy or without a climatological refer-
¹Department of Electrical and Computer Engineering, North South University, Bashundhara, Dhaka-1229, Bangladesh. Correspondence to: Shahran Rahman Alve shahran.alve@northsouth.edu, Muhammad Zawad Mahmud zawad.mahmud1@northsouth.edu, Samiha Islam samiha.islam2@northsouth.edu, Al Jubayer Pial jubayer.pial@northsouth.edu.
Preprint. October 30, 2026.
ence. In this paper we ask how much of the performance obtained in this way survives a stricter evaluation, and what skill station data can actually provide.
Contributions. (1) We build a cleaned version of the public BMD station dataset in which missing days are treated as missing rather than as zero rainfall, and define four forecasting tasks: next-day rain occurrence, next-day amount, next-day heavy rain (≥44 mm), and one-month-ahead totals. (2) We compare three evaluation protocols (random, temporal, spatio-temporal) and two feature sets (calendar-only, antecedent rainfall) for six learners and four reference forecasts, with repeated seeds, block-bootstrap confidence intervals and Diebold–Mariano tests. (3) We show that the random split inflates calendar-only models, that climatology explains almost all of the apparent monthly skill, and that lagged rainfall adds real but small next-day skill that varies by season. (4) In further experiments we show that station and year inputs reduce skill even under a clean split, that skill vanishes beyond two days, that observations from neighbouring stations add skill legitimately, that a recurrent sequence model brings no gain over trees, and that zero-filling missing data creates artificial droughts. (5) We release code and a checklist for leakage-aware evaluation of station-based rainfall models. Figure 1 summarises the workflow.
Deep learning for weather and precipitation. At the other end of the spectrum, deep networks now forecast precipitation from radar and satellite fields. ConvLSTM introduced a spatio-temporal recurrent architecture for nowcasting (Shi et al., 2015), deep generative models produced skilful radar nowcasts that were preferred by forecasters (Ravuri et al., 2021), and MetNet-2 extended neural precipitation forecasts to twelve hours (Espeholt et al., 2022). Global models
trained on ERA5 reanalysis (Hersbach et al., 2020) now rival operational numerical weather prediction at medium range (Lam et al., 2023; Bi et al., 2023), including probabilistic ensembles (Price et al., 2025), hybrid physics–ML models (Kochkov et al., 2024) and foundation models (Nguyen et al., 2023). Super-resolution and process emulation have also been studied (Adewoyin et al., 2021; Gettelman et al., 2021). A recurring lesson from this literature is the importance of standard benchmarks, held-out years and strong reference forecasts (Rasp et al., 2020; Schultz et al., 2021; Reichstein et al., 2019). Station-level studies in data-sparse regions rarely follow the same practice; our work brings it to that setting.
Evaluation, leakage and forecast verification. Leakage occurs when information that would not be available at prediction time enters training or evaluation (Kaufman et al., 2012); Kapoor & Narayanan (2023) found it in hundreds of ML-based scientific papers, and Lones (2024) lists it among the most common pitfalls. For time series, random cross-validation can be optimistic and blocked or forward-chaining schemes are preferred (Bergmeir & Benítez, 2012; Cerqueira et al., 2020; Hyndman & Athanasopoulos, 2021). For spatial data, random splits overstate performance compared with spatial blocking (Roberts et al., 2017; Ploton et al., 2020; Meyer & Pebesma, 2021). In meteorology, forecasts are verified with proper scores such as the Brier score (Brier, 1950; Gneiting & Raftery, 2007) and reported as skill against climatology or persistence (Murphy, 1988; 1993; Wilks, 2019). Classical statistical models such as weather generators (Richardson, 1981), downscaling regressions (Wilby et al., 1998) and seasonal ARIMA (Box et al., 2015) provide strong baselines, and forecasting competitions show that simple methods are hard to beat (Makridakis et al., 2020). Paired accuracy differences can be tested with the Diebold–Mariano test and its small-sample correction (Diebold & Mariano, 1995; Harvey et al., 1997). We apply these established practices to a public rainfall dataset that has mostly been studied with random splits.
3. Data and Tasks
Source. We use the public “Historical Rainfall Data in Bangladesh” collection of BMD station records (Redikod). The raw file contains daily rainfall (mm) for 35 stations from January 1948 to June 2014, with one row per station-month and one column per day. Stations enter the network at different times, so the number of reporting stations grows from a handful in the 1950s to 35 by the 1980s (Figure 2, right).
Cleaning. The raw file marks missing days with asterisks. Derived versions of the file that circulate with the dataset replace these marks with zero, which silently turns missing observations into dry days. We instead treat them

Figure 1. Workflow of the study. Raw BMD records are cleaned so that missing days remain missing, then turned into daily and monthly forecasting tasks. Each model is trained with calendar, antecedent or network inputs and evaluated under three protocols, always against reference forecasts and with skill scores relative to climatology. The dashed red path marks the combination that inflates reported accuracy: calendar inputs with a random split, which lets a model recover the target day's rainfall from neighbouring stations.

Figure 2. Data. Left: mean monthly total across stations (bars) with 10th–90th percentile range; over 70% of annual rainfall falls in June–September. Right: number of stations with a valid monthly total per year, with the training (1950–1999) and test (2005–2013) periods shaded.
as missing (2.17% of station-days), drop impossible dates (e.g. 31 February), and treat negative or implausible values (>1000 mm/day) as missing. The result is 632,377 station-days. Monthly totals are computed only for months with at least 25 observed days and are scaled to the full month length; this gives 19,829 valid station-months (1950–2013).
Tasks. All forecasts are issued at the end of day (or month ) for station and use only information available at that time.
-
Next-day occurrence: is rainfall on day at least 1 mm? (31% of station-days are wet.)
-
Next-day amount: rainfall on day in mm.
-
Next-day heavy rain: is rainfall on day at least 44 mm, BMD's threshold for moderately heavy rain? (4.0% of test days.)
-
Monthly totals: total rainfall in month (regression), and whether it exceeds the 62.5th percentile of training-period totals (203 mm), so that about three in eight months are labelled high.
The daily table has 618,650 station-days with a known next-day value.
4. Experimental Protocol
Evaluation protocols. We compare three ways to split the data. Random: station-days (or station-months) are assigned to training (80%) or test (20%) at random, as is common in prior work; we repeat this with three seeds. Temporal: training uses 1948–1999 and testing uses 2005 to the end of the record (120,172 test station-days; 3,743 test station-months for 2005–2013). The five-year gap limits dependence between the last training days and the first test days. Spatio-temporal: stations are randomly partitioned into five groups; each group is held out in turn, models are trained on the other stations in 1948–1999 and tested on the held-out stations in 2005–2014. This measures how well a model transfers to a location it has never seen, which matters for the many places in Bangladesh without a station.
Feature sets. Calendar features (station code, year, month, day) reproduce the common station-and-date setup described above. Antecedent features add information that is actually available at forecast time: rainfall on the current and previous six days, 3-, 7- and 30-day totals, the number of wet days in the past week, the length of the current dry spell, a cyclical encoding of day-of-year, and the station's climatological mean and wet-day frequency for that day of year. For monthly forecasts the antecedent features are the totals of the previous 1, 2, 3 and 12 months, a 3-month mean and the station-month climatology. Climatologies are always computed from training rows only; for stations held out in the spatio-temporal protocol we use the network-wide climatology of the training stations.
Reference forecasts. Climatology predicts, for each station and day of year, the training-period mean amount and wet-day frequency, smoothed with a 15-day window (station-month means for monthly tasks). Persistence predicts that tomorrow equals today (or next month equals this month). Seasonal naive predicts the value from twelve months earlier. SARIMA(1,0,0)(1,1,1) is fitted per station on log-transformed monthly totals for 1950–1999 and used for one-step forecasts with fixed parameters (Box et al., 2015; Seabold & Perktold, 2010); three stations with too short a training record are excluded, so SARIMA is compared with the other methods on the common subset.
Learners. We use logistic or ridge regression, -nearest neighbours (, fitted on a random 100,000-row subsample for speed), a decision tree (depth 12), a random forest (Breiman, 2001) (100 trees on daily data, 300 on monthly), histogram gradient boosting (Friedman, 2001; Ke et al., 2017) and a two-layer perceptron (64 units each), all from scikit-learn (Pedregosa et al., 2011). In Section 6.6 we also train a GRU sequence model (Section 5). Hyperparameters were fixed in advance at common defaults rather than tuned on the test period. For occurrence, the decision threshold maximises F1 on a 50,000-row sample of the training data.
Metrics and tests. For occurrence we report ROC AUC, the Brier score and the Brier skill score BSS = 1 – BS/BS (Brier, 1950), plus accuracy, precision, recall and F1 at the chosen threshold. For amounts we report MAE, RMSE, and the MSE skill score MSESS = 1 – MSE/MSE (Murphy, 1988). A positive skill score means the model beats climatology. Confidence intervals for daily skill scores come from 500 bootstrap resamples of whole test years, which preserves within-year dependence. For monthly totals we apply the Diebold–Mariano test with the Harvey–Leybourne–Newbold correction to the monthly mean absolute-error differential across stations (Diebold & Mariano, 1995; Harvey et al., 1997).
5. Implementation Details
Data processing. Daily values are read from the raw BMD file; entries consisting of asterisks or blanks are treated as missing, impossible dates are removed, and values below 0 or above 1000 mm are set to missing. For each station the series is re-indexed to a complete daily calendar, so that lagged features always refer to the correct day; a lagged value is missing if the corresponding day is missing. Rolling totals require at least two of three, five of seven and twenty of thirty valid days. The dry-spell length counts consecutive days with less than 1 mm up to day .
Climatology. For each station and day of year, the mean next-day amount and wet-day frequency are computed from training rows only and smoothed with a 31-day moving window that wraps around the year. For stations absent from the training set (spatio-temporal protocol), the network-wide climatology of the training stations is used. For lead , the climatology is computed for the rainfall days after each day of year.
Learners. All hyperparameters were fixed before seeing test results (Table 1). The occurrence threshold used for
accuracy, precision, recall and F1 maximises F1 on a 50,000-row sample of the training data over a grid from 0.1 to 0.9. Probabilistic scores (AUC, Brier) do not depend on this threshold.
Statistical tests. Confidence intervals for daily skill resample the ten test years with replacement (500 resamples) and recompute the score on the pooled resample. The Diebold–Mariano statistic uses the series of monthly mean differences in absolute error across stations, with the Harvey–Leybourne–Newbold small-sample correction and a Student- reference distribution with degrees of freedom.
6. Results
6.1. Monthly forecasts: how much is seasonality?
Table 2 reports the classification of high- versus low-rainfall months under random and temporal evaluation.
Three points stand out. First, the climatology baseline is already very strong: forecasting the training-period frequency of a high month for each station and calendar month gives 88.4% accuracy and AUC 0.950 on future years. Under temporal evaluation every learner is within 0.8 points of this, and calendar-only models fall below it (87.2–87.6% accuracy); under the random split the best learner gains 1.5 points. High classification accuracy on this task is therefore explained mostly by the seasonal cycle rather than by the learner. Second, for monthly totals, the calendar-only random forest has a lower MAE than climatology under the random split (77.3 vs. 83.9 mm, mean of three seeds, when both are fitted on the same random training rows), but under temporal evaluation it is worse (87.1 vs. 80.3 mm). The random split rewards the model for memorising which station-months were wet in a given year, information that is not available when forecasting. Third, no regression model beats climatology on monthly totals under temporal evaluation. The zero-filled versions of the file also bias monthly totals and errors downward, so error values computed from them are not comparable with ours.
Table 3 shows the full monthly regression comparison. On the 3,419 test station-months where all methods are available, ridge regression and the random forest had significantly larger absolute errors than climatology (Diebold–Mariano and ). SARIMA had a slightly lower MAE (76.4 vs. 79.2 mm) but a higher RMSE (132.2 vs. 126.7 mm), and the MAE difference was not significant (). Persistence and seasonal naive forecasts were far worse than climatology, as expected for a strongly seasonal but noisy variable.
Table 1. Hyperparameters (fixed in advance).
| Model | Setting |
|---|---|
| Logistic / ridge regressionk-nearest neighbours | median imputation, standardisation; L2 penalty, , standardised inputs, fitted on 100,000 random training rows |
| Decision tree | maximum depth 12, at least 20 samples per leaf |
| Random forest | daily: 100 trees, 20% rows per tree, 50% features per split; monthly: 300 trees; at least 5 samples per leaf |
| Histogram gradient boosting | 300 iterations, learning rate 0.05; early stopping on 10% of training rows in the main table, none in Section 6.6 |
| MLP | two hidden layers of 64 ReLU units, Adam, early stopping, at most 50 epochs |
| GRU | 30-day input of with a missing-day mask; 64 hidden units; 8-dimensional station embedding; seasonal encoding and climatology as static inputs; joint logistic and log-amount heads; Adam, learning rate , batch 1024, early stopping on 1995–1999 (patience 3); amounts rescaled by a factor fitted on 1995–1999 |
| SARIMA | on , fitted on 1950–1999, parameters fixed for one-step forecasts |
Table 2. High- vs. low-rainfall month classification (threshold 203 mm). Random-split values are means over three seeds (s.d. points). Acc. and F1 in %. Features: Cal = calendar only, Ant = antecedent rainfall.
| Model | Feat. | Random split | Temporal split | ||||
|---|---|---|---|---|---|---|---|
| Acc. | AUC | F1 | Acc. | AUC | F1 | ||
| Climatology | – | 87.8 | 0.946 | 84.6 | 88.4 | 0.950 | 84.9 |
| Logistic | Cal | 58.9 | 0.609 | 0.0 | 49.1 | 0.607 | 0.1 |
| Random forest | Cal | 88.2 | 0.950 | 84.9 | 87.2 | 0.942 | 85.0 |
| Grad. boosting | Cal | 89.3 | 0.958 | 86.5 | 87.6 | 0.951 | 85.5 |
| Logistic | Ant | 88.0 | 0.950 | 84.5 | 88.8 | 0.956 | 85.6 |
| Random forest | Ant | 88.6 | 0.956 | 85.5 | 89.2 | 0.956 | 86.5 |
| Grad. boosting | Ant | 88.7 | 0.956 | 85.6 | 88.4 | 0.953 | 86.0 |
6.2. Why random splits leak
The leak is specific to rainfall's spatial structure. On a given day, wet conditions usually extend over many stations (median pairwise correlation 0.31 for amounts and 0.51 for occurrence). Under a random split, about 80% of the other stations' records for the forecast day are in the training set, so a flexible model with station and date inputs can learn the "weather of the day". To make this explicit, Table 4 adds the mean target-day rainfall at all other stations as an oracle feature. This feature raises next-day occurrence AUC from 0.849 to 0.921 and amount from 0.08 to 0.37 under temporal evaluation. A random split gives calendar-only models part of this benefit implicitly: their AUC rises from 0.849 (temporal) to 0.867 (random), and doubles from 0.08 to 0.16. Tree models, which can carve out individual dates, benefit most (Section 6.3).
6.3. Daily forecasts across protocols
Table 5 and Figure 4 show next-day results for all learners. Under the random split, the calendar-only random forest reaches an AUC of 0.889, which is higher than every model under temporal evaluation, including those that use the previous week's rainfall (best 0.879). On future years the
Table 3. One-month-ahead station totals (mm). Temporal split: train 1950–1999, test 2005–2013 (3,743 station-months). †SARIMA covers 32 stations (3,419 station-months); on that subset climatology has MAE 79.2 and RMSE 126.7. Random split: mean over three seeds, with climatology refitted on the same random training rows.
| Model | Feat. | MAE | RMSE | |
|---|---|---|---|---|
| Temporal split | ||||
| Climatology | – | 80.3 | 129.1 | 0.718 |
| Persistence | – | 132.7 | 212.7 | 0.236 |
| Seasonal naive | – | 108.6 | 182.4 | 0.436 |
| SARIMA† | – | 76.4 | 132.2 | 0.708 |
| Ridge | Cal | 186.3 | 241.2 | 0.016 |
| Random forest | Cal | 87.1 | 136.9 | 0.683 |
| Grad. boosting | Cal | 87.3 | 134.6 | 0.694 |
| Ridge | Ant | 83.3 | 130.1 | 0.714 |
| Random forest | Ant | 85.1 | 133.9 | 0.697 |
| Grad. boosting | Ant | 89.7 | 138.2 | 0.677 |
| Random split | ||||
| Climatology | – | 83.9 | – | 0.694 |
| Random forest | Cal | 77.3 | – | 0.718 |
same model drops to 0.835, below the climatology reference (0.859). The same pattern holds for amounts: the calendar-only random forest has under the random split but only 0.080 under temporal evaluation and –0.010 on unseen stations. A reader who saw only the random-split numbers would conclude that station and date alone predict tomorrow's rain better than recent observations, which is not true.
With antecedent features, the three protocols agree much more closely, because these features do not let the model look up the target day. Under temporal evaluation, the best learners (random forest, gradient boosting, MLP and logistic regression) reach AUC 0.876–0.879 and 0.21–0.24, and differ from each other by less than the gap between them and climatology. Logistic regression is within 0.003 AUC of the best tree ensemble, consistent with findings that the data, not the learner, set the ceiling for tabular problems of this
Table 4. Leakage probe (next day, gradient boosting). “+ network adds the oracle mean target-day rainfall at all other stations, information a random split exposes implicitly.
| Split | Features | AUC | MAE | |
|---|---|---|---|---|
| Random | Cal | 0.867 | 7.86 | 0.164 |
| Random | Cal + network | 0.916 | 6.33 | 0.343 |
| Temporal | Cal | 0.849 | 8.34 | 0.081 |
| Temporal | Cal + network | 0.921 | 6.13 | 0.366 |

Figure 3. Temporal evaluation, gradient boosting with antecedent features. Left: next-day occurrence AUC by season (winter, pre-monsoon, monsoon, post-monsoon), compared with climatology. Right: reliability diagram; points are 10 probability bins with at least 100 cases.
kind (Grinsztajn et al., 2022). On unseen stations (spatio-temporal protocol), calendar-only models fall to AUC 0.812–0.842, below a network-wide climatology (0.854), because a station code learned on other stations carries no information about a new one. Models with antecedent features lose little: AUC 0.852–0.878 and 0.11–0.18, against 0.854 and 0.097 for climatology. Recent rainfall at the target station is therefore a predictor that transfers across locations, while station and date inputs do not.
6.4. Skill relative to climatology
How much does a model with real predictors add? Under temporal evaluation, gradient boosting with antecedent features has a Brier skill score of 0.074 (95% CI 0.064–0.088) for occurrence and an MSE skill score of 0.077 (0.064–0.095) for amounts; logistic regression reaches a BSS of 0.063 (0.056–0.069). The AUC gain over climatology is 0.022 (0.018–0.026). These intervals exclude zero, so the skill is real, but it is small: the models remove about 7–8% of the squared error left by climatology.
Skill varies by season (Figure 3, left). During the monsoon, climatology alone separates wet and dry days poorly (AUC 0.63) because most days are wet; antecedent rainfall raises AUC to 0.71 but the BSS stays at 0.077. The largest relative gain is in the post-monsoon season (October–November; AUC 0.79 to 0.85, BSS 0.110), when the previous day’s rain appears to be especially informative, possibly because post-monsoon rain often comes in multi-day spells. In winter, rain is rare (3.3% of days) and the BSS is 0.075. Forecast
probabilities are well calibrated on future years (Figure 3, right), which matters more for users than a thresholded accuracy.
6.5. Heavy rain
Heavy rain (≥44 mm) occurs on 4.0% of test days and is the case that matters most for flood warning. A dedicated gradient-boosting classifier reaches AUC 0.866 against 0.825 for a heavy-rain climatology, with a BSS of 0.053 (0.042–0.063). Even with the best possible threshold chosen on the test set, which is optimistic, F1 is only 0.31 (precision 0.27, recall 0.37). Thresholding the regression forecast at 44 mm detects only 11% of heavy-rain days, because squared-error regression shrinks toward the mean. Station records alone are therefore not enough for useful heavy-rain warnings at a one-day lead; this is where radar, satellite or numerical weather prediction inputs (Ravuri et al., 2021; Espeholt et al., 2022; Lam et al., 2023) are needed.
6.6. Further analyses
Station and year inputs hurt. Removing one feature group at a time (Figure 5c) shows that the previous seven days of rainfall carry most of the information: dropping them lowers the BSS from 0.074 to 0.061, and dropping the climatology features lowers it to 0.072. Removing the station code and year raises the BSS to 0.091 and the MSESS to 0.104 (Table 6); removing the seasonal encoding also helps slightly (0.084). A likely reason is that test years lie outside the training range, so a tree model that splits on year can carry patterns from the last training years into every later year, and a station code lets it fit station-specific noise that the climatology features already summarise. Calendar and identifier inputs, which drive the leakage in Section 6.2, are therefore harmful even under a clean split.
Skill fades after one day. Figure 5a repeats the experiment for forecasts of rain 2, 3, 5 and 7 days ahead, each scored against its own climatology. Skill drops from 0.091 (one day) to 0.020 (two days) and is indistinguishable from zero from three days on. With all inputs, gradient boosting becomes worse than climatology at leads of two days or more (BSS between −0.004 and −0.034), again because of the year and station inputs; without them it is 0.020 at two days and within 0.004 of zero thereafter. Station rainfall carries information about the next day only, which is consistent with the short life of most rain-producing systems; useful forecasts at longer leads require dynamical or large-scale predictors (Lam et al., 2023; Price et al., 2025).
Network observations help legitimately. Rainfall observed on day t at the other 34 stations is available when the forecast is issued, unlike the target-day values in Table 4. Adding three network summaries (mean rainfall today, mean 3-day total and fraction of wet stations) raises the BSS from
Table 5. Next-day forecasts. ROC AUC for occurrence (≥1 mm) and for amount, under random, temporal and spatio-temporal evaluation, with calendar-only (Cal) or antecedent-rainfall (Ant) features. Random split: mean of three seeds (s.d. ≤0.002 AUC). Spatio-temporal: five held-out station groups, weighted by test size. Reference forecasts use no learned features; on held-out stations climatology is the network-wide average. Bold: best per column. Underlined: calendar-only models whose random-split score exceeds the best temporal score with real predictors.
| Model | Occurrence: AUC | Amount: | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Rand. | Temp. | Sp.-temp. | Rand. | Temp. | Sp.-temp. | |||||||
| Cal | Ant | Cal | Ant | Cal | Ant | Cal | Ant | Cal | Ant | Cal | Ant | |
| Climatology | - | 0.847 | - | 0.859 | - | 0.854 | - | 0.128 | - | 0.140 | - | 0.097 |
| Persistence | - | 0.758 | - | 0.763 | - | 0.763 | - | -0.255 | - | -0.205 | - | -0.244 |
| Logistic / ridge | 0.562 | 0.868 | 0.580 | 0.876 | 0.578 | 0.873 | 0.003 | 0.201 | 0.003 | 0.219 | -0.005 | 0.184 |
| k-NN | 0.843 | 0.865 | 0.843 | 0.870 | 0.842 | 0.868 | 0.104 | 0.191 | 0.054 | 0.208 | 0.024 | 0.170 |
| Decision tree | 0.870 | 0.872 | 0.817 | 0.862 | 0.812 | 0.852 | 0.152 | 0.177 | 0.003 | 0.157 | -0.111 | 0.108 |
| Random forest | 0.889 | 0.883 | 0.835 | 0.879 | 0.832 | 0.877 | 0.193 | 0.219 | 0.080 | 0.220 | -0.010 | 0.170 |
| Grad. boosting | 0.866 | 0.885 | 0.848 | 0.879 | 0.839 | 0.877 | 0.165 | 0.228 | 0.088 | 0.208 | -0.028 | 0.166 |
| MLP | 0.846 | 0.877 | 0.812 | 0.877 | 0.822 | 0.878 | 0.113 | 0.218 | -0.063 | 0.235 | 0.001 | 0.183 |

Figure 4. Next-day forecasts under three evaluation protocols. Hatched bars use calendar features only; solid bars add antecedent rainfall. The dashed line is climatology under temporal evaluation. Calendar-only tree models look strong under the random split and fall below climatology on future years and new stations.
Table 6. Next-day skill on future years (temporal split, test 2005–2014). Skill scores are relative to climatology. GB = gradient boosting. “No st./yr” drops the station code and year inputs. “+ network” adds rainfall observed on day at the other stations, which is available when the forecast is issued. GRU: mean s.d. over three seeds; GB (no st./yr): s.d. over five bootstrap refits 0.001.
| Model | AUC | BSS | MSESS |
|---|---|---|---|
| Climatology | 0.859 | 0 | 0 |
| Logistic / ridge (Ant) | 0.876 | 0.063 | 0.092 |
| GB (Ant, all inputs) | 0.880 | 0.074 | 0.077 |
| GB (Ant, no st./yr) | 0.883 | 0.091 | 0.104 |
| GRU (30-day seq.) | 0.884 .000 | 0.092 .001 | 0.095 .003 |
| GB (no st./yr) + network | 0.896 | 0.131 | 0.140 |
0.091 to 0.131 and the MSESS from 0.104 to 0.140 (Table 6), and, in models that keep all inputs, improves every one of the 35 stations (Figure 5d; station BSS 0.084–0.188, compared with 0.025–0.150 without network inputs). Skill
over climatology is positive at every station and in every test year (BSS 0.054–0.112 per year without network inputs and 0.088–0.157 with them; Table 7). The network adds 0.040 BSS at a one-day lead, 0.015 at two days and nothing beyond (Figure 5a).
A sequence model does not change the picture. A GRU that reads the last 30 days of rainfall with a station embedding and the seasonal context, trained with early stopping on 1995–1999, reaches AUC 0.884, BSS 0.092 and MSESS 0.095, essentially the same as gradient boosting without station and year inputs (Table 6). Ridge regression is also competitive for amounts (MSESS 0.092). The limit is the information in station rainfall, not the model class.
How much history is needed? With the test years fixed, training on only the last 10 years before 2000 already gives a BSS of 0.057 (gradient boosting) and 0.064 (logistic regression), and the gain from 30 or 52 years is small (Figure 5b).



Figure 5. Further analyses (temporal evaluation, next-day occurrence unless stated). (a) Brier skill score against lead time. (b) Skill against the length of the training record, with test years fixed at 2005–2014 and the full-record climatology as reference. (c) Skill after removing one feature group from the gradient-boosting model; the dotted line is the full model. (d) Skill at each of the 35 stations, with and without network observations.
With 5 years, logistic regression is worse than the full-record climatology ( ). Short records are thus enough for next-day models, but the climatological reference itself benefits from a long record.
Missing values are not zeros. Of the 20,778 station-months in the zero-filled versions of the file, 506 have fewer than 25 observed days and 321 have none. Zero filling turns these months into apparent droughts: their mean total is 28.6 mm, against a station-month climatology of 184.7 mm. A further 606 months with a few missing days lose 15.9 mm on average. Such artificial dry months can dominate error metrics for monthly models and should be removed rather than filled.
6.7. Additional results
Per-year skill. Table 7 lists next-day skill for each test year. Skill is positive in every year, ranging from 0.054 to 0.112 with antecedent features and 0.088 to 0.157 with network observations, so the average result is not driven by a single unusual year. The 2014 values cover January–June only.
Leakage at the monthly scale. The monthly random split leaks in the same way as the daily one: other stations' totals for the same month enter the training set. Under the random split, the calendar-only random forest beats a climatology fitted on the same rows by 6.6 mm MAE on average over three seeds (Table 3); under the temporal split it is 6.8 mm worse.
Heavy-rain thresholds. Section 6.5 reports F1 at the best threshold chosen on the test set, which is an upper bound. The corresponding probability threshold was 0.18, much lower than 0.5 because heavy rain occurs on only 4% of days.
7. Discussion
What high accuracy means. Rainfall categories in Bangladesh can be separated with high accuracy, and with calendar inputs tree ensembles appear far better than linear models. Our analysis shows that this separation comes mostly from seasonality, and that the ranking of learners depends on the split and the features. The near-failure of linear models with calendar inputs (Tables 2 and 5) is a property of the feature encoding (month as a number cannot represent a seasonal peak), not evidence that linear models are weak forecasters: with antecedent features, logistic regression is within 0.003 AUC of the best ensemble.
A checklist for station-based rainfall studies. Based on these results, we suggest that studies (i) state the split and use held-out years, with a gap between training and test periods; (ii) use held-out stations when claiming spatial generalisation; (iii) report skill against climatology and persistence, not only accuracy or ; (iv) use only predictors available at the forecast time and fit climatologies and scalers on training data only; (v) treat missing observations as missing; (vi) report probabilistic scores and calibration for occurrence; (vii) report heavy-rain performance separately; and (viii) avoid station identifiers and year as inputs when forecasting future years. Items (i), (iii), (iv) and (viii) changed our conclusions the most.
Limitations. We use rainfall alone; temperature, humidity, pressure and large-scale indices such as ENSO or reanalysis fields (Hersbach et al., 2020) would likely add skill, especially for monthly forecasts. The station network is sparse and its composition changes over time, so the spatiotemporal protocol tests only transfer between existing stations. Hyperparameters were fixed rather than tuned, which avoids test-set tuning but may leave some performance unused; the narrow spread between very different learners suggests the effect is small. The high/low threshold for monthly classification is a choice; other thresholds would
Table 7. Next-day occurrence skill by test year (temporal split, gradient boosting with all antecedent inputs, with and without network observations).
| Year | 2005 | 2006 | 2007 | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 |
|---|---|---|---|---|---|---|---|---|---|---|
| Wet-day rate | 0.32 | 0.30 | 0.33 | 0.33 | 0.29 | 0.31 | 0.32 | 0.32 | 0.32 | 0.20 |
| BSS | 0.112 | 0.054 | 0.081 | 0.056 | 0.054 | 0.060 | 0.082 | 0.068 | 0.091 | 0.092 |
| BSS + network | 0.144 | 0.088 | 0.148 | 0.141 | 0.132 | 0.098 | 0.129 | 0.157 | 0.139 | 0.121 |
change the absolute accuracies, although the comparison with climatology is the point of interest. Finally, the dataset ends in mid-2014, and more recent BMD data would allow a test on a warmer climate.
8. Conclusion
Using six decades of Bangladesh station rainfall, we showed that random train-test splits and calendar-only features make machine-learning rainfall forecasts look much better than they are, and that climatology alone accounts for nearly all of the high accuracy in classifying high- and low-rainfall months. Models that use recent rainfall provide real but modest skill for next-day forecasts, largest after the monsoon and largest overall when same-day observations from the station network are used. Skill disappears beyond two days, is limited for heavy rain, and is not significant for monthly totals. A recurrent sequence model does not change these conclusions. We hope the released protocol helps future studies on data-sparse regions report results that reflect forecasting skill.
Impact Statement
This work aims to improve how rainfall forecasting models are evaluated in data-sparse regions. Its main positive impact is to reduce the risk that over-optimistic accuracy figures lead to unwarranted trust in models for flood preparedness or agricultural planning. The models studied here are not operational systems and should not replace official BMD forecasts or warnings. We use only public, non-personal meteorological records.
Reproducibility
All code, the cleaned data tables and the raw result files will be released with the paper. Experiments run on a two-core CPU; the complete daily experiment takes about three hours, and the GRU a few minutes per seed. Implementation details are in Section 5.
References
Adewoyin, R. A., Dueben, P., Watson, P., He, Y., and Dutta, R. TRU-NET: a deep learning approach to high resolution prediction of rainfall. Machine Learning, 110(8):2035–
2062, 2021.
Barrera-Animas, A. Y., Oyedele, L. O., Bilal, M., Akinosho, T. D., Delgado, J. M. D., and Akanbi, L. A. Rainfall prediction: A comparative analysis of modern machine learning algorithms for time-series forecasting. Machine Learning with Applications, 7:100204, 2022.
Bergmeir, C. and Benítez, J. M. On the use of cross-validation for time series predictor evaluation. Information Sciences, 191:192–213, 2012.
Bi, K., Xie, L., Zhang, H., Chen, X., Gu, X., and Tian, Q. Accurate medium-range global weather forecasting with 3D neural networks. Nature, 619:533–538, 2023.
Box, G. E. P., Jenkins, G. M., Reinsel, G. C., and Ljung, G. M. Time Series Analysis: Forecasting and Control. Wiley, 5th edition, 2015.
Breiman, L. Random forests. Machine Learning, 45(1): 5–32, 2001.
Brier, G. W. Verification of forecasts expressed in terms of probability. Monthly Weather Review, 78(1):1–3, 1950.
Cerqueira, V., Torgo, L., and Mozetič, I. Evaluating time series forecasting models: an empirical study on performance estimation methods. Machine Learning, 109(11): 1997–2028, 2020.
Chhetri, M., Kumar, S., Pratim Roy, P., and Kim, B.-G. Deep BLSTM-GRU model for monthly rainfall prediction: A case study of Sintokha, Bhutan. Remote Sensing, 12(19):3174, 2020.
Cramer, S., Kampouridis, M., Freitas, A. A., and Alexandridis, A. K. An extensive evaluation of seven machine learning methods for rainfall prediction in weather derivatives. Expert Systems with Applications, 85:169–181, 2017.
Diebold, F. X. and Mariano, R. S. Comparing predictive accuracy. Journal of Business & Economic Statistics, 13 (3):253–263, 1995.
Espeholt, L., Agrawal, S., Sønderby, C., Kumar, M., Heek, J., Bromberg, C., Gazen, C., Carver, R., Andrychowicz, M., Hickey, J., Bell, A., and Kalchbrenner, N. Deep learning for twelve hour precipitation forecasts. Nature Communications, 13:5145, 2022.
Friedman, J. H. Greedy function approximation: A gradient boosting machine. The Annals of Statistics, 29(5):1189–1232, 2001.
Gettelman, A., Gagne, D. J., Chen, C.-C., Christensen, M. W., Lebo, Z. J., Morrison, H., and Gantos, G. Machine learning the warm rain process. Journal of Advances in Modeling Earth Systems, 13(2):e2020MS002268, 2021.
Gneiting, T. and Raftery, A. E. Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477):359–378, 2007.
Grinsztajn, L., Oyallon, E., and Varoquaux, G. Why do tree-based models still outperform deep learning on typical tabular data? In Advances in Neural Information Processing Systems: Datasets and Benchmarks Track, volume 35, 2022.
Harvey, D., Leybourne, S., and Newbold, P. Testing the equality of prediction mean squared errors. International Journal of Forecasting, 13(2):281–291, 1997.
Hersbach, H., Bell, B., Berrisford, P., Hirahara, S., Horányi, A., Muñoz-Sabater, J., Nicolas, J., Peubey, C., Radu, R., Schepers, D., et al. The ERA5 global reanalysis. Quarterly Journal of the Royal Meteorological Society, 146(730):1999–2049, 2020.
Hyndman, R. J. and Athanasopoulos, G. Forecasting: Principles and Practice. OTexts, Melbourne, Australia, 3rd edition, 2021.
Kapoor, S. and Narayanan, A. Leakage and the reproducibility crisis in machine-learning-based science. Patterns, 4 (9):100804, 2023.
Karim, F., Mainuddin, M., Hasan, M., and Kirby, M. Assessing the potential impacts of climate changes on rainfall and evapotranspiration in the northwest region of Bangladesh. Climate, 8(8):94, 2020.
Kaufman, S., Rosset, S., Perlich, C., and Stitelman, O. Leakage in data mining: Formulation, detection, and avoidance. ACM Transactions on Knowledge Discovery from Data, 6(4):15:1–15:21, 2012.
Ke, G., Meng, Q., Finley, T., Wang, T., Chen, W., Ma, W., Ye, Q., and Liu, T.-Y. LightGBM: A highly efficient gradient boosting decision tree. In Advances in Neural Information Processing Systems, volume 30, 2017.
Kochkov, D., Yuval, J., Langmore, I., Norgaard, P., Smith, J., Mooers, G., Klöwer, M., Lottes, J., Rasp, S., Düben, P., et al. Neural general circulation models for weather and climate. Nature, 632:1060–1066, 2024.
Kratzert, F., Klotz, D., Brenner, C., Schulz, K., and Herringer, M. Rainfall–runoff modelling using Long Short-Term Memory (LSTM) networks. Hydrology and Earth System Sciences, 22(11):6005–6022, 2018.
Lam, R., Sanchez-Gonzalez, A., Willson, M., Wirsnberger, P., Fortunato, M., Alet, F., Ravuri, S., Ewalds, T., Eaton-Rosen, Z., Hu, W., et al. Learning skillful medium-range global weather forecasting. Science, 382(6677):1416–1421, 2023.
Liyew, C. M. and Melese, H. A. Machine learning techniques to predict daily rainfall amount. Journal of Big Data, 8:153, 2021.
Lones, M. A. Avoiding common machine learning pitfalls. Patterns, 5(10):101046, 2024.
Makridakis, S., Spiliotis, E., and Assimakopoulos, V. The M4 competition: 100,000 time series and 61 forecasting methods. International Journal of Forecasting, 36(1): 54–74, 2020.
Meyer, H. and Pebesma, E. Predicting into unknown space? Estimating the area of applicability of spatial prediction models. Methods in Ecology and Evolution, 12(9):1620–1633, 2021.
Murphy, A. H. Skill scores based on the mean square error and their relationships to the correlation coefficient. Monthly Weather Review, 116(12):2417–2424, 1988.
Murphy, A. H. What is a good forecast? An essay on the nature of goodness in weather forecasting. Weather and Forecasting, 8(2):281–293, 1993.
Nguyen, T., Brandstetter, J., Kapoor, A., Gupta, J. K., and Grover, A. ClimaX: A foundation model for weather and climate. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 25904–25938, 2023.
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., et al. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.
Pham, B. T., Le, L. M., Le, T.-T., Bui, K.-T. T., Le, V. M., Ly, H.-B., and Prakash, I. Development of advanced artificial intelligence models for daily rainfall prediction. Atmospheric Research, 237:104845, 2020.
Ploton, P., Mortier, F., Réjou-Méchain, M., Barbier, N., Picard, N., Rossi, V., Dormann, C., Cornu, G., Viennois, G., Bayol, N., et al. Spatial validation reveals poor predictive performance of large-scale ecological mapping models. Nature Communications, 11:4540, 2020.
Price, I., Sanchez-Gonzalez, A., Alet, F., Andersson, T. R., El-Kadi, A., Masters, D., Ewalds, T., Stott, J., Mohamed, S., Battaglia, P., Lam, R., and Willson, M. Probabilistic weather forecasting with machine learning. Nature, 637: 84–90, 2025.
Rahman, A.-u., Abbas, S., Gollapalli, M., Ahmed, R., Aftab, S., Ahmad, M., Khan, M. A., and Mosavi, A. Rainfall prediction system using machine learning fusion for smart cities. Sensors, 22(9):3504, 2022.
Rasp, S., Dueben, P. D., Scher, S., Weyn, J. A., Mouatadid, S., and Thuerey, N. WeatherBench: A benchmark data set for data-driven weather forecasting. Journal of Advances in Modeling Earth Systems, 12(11):e2020MS002203, 2020.
Ravuri, S., Lenc, K., Willson, M., Kangin, D., Lam, R., Mirowski, P., Fitzsimons, M., Athanassiadou, M., Kashem, S., Madge, S., et al. Skilful precipitation nowcasting using deep generative models of radar. Nature, 597:672–677, 2021.
Redikod. Historical rainfall data in Bangladesh. Kaggle dataset, https://www.kaggle.com/datasets/redikod/historical-rainfall-data-in-bangladesh. Station records of the Bangladesh Meteorological Department.
Reichstein, M., Camps-Valls, G., Stevens, B., Jung, M., Denzler, J., Carvalhais, N., and Prabhat. Deep learning and process understanding for data-driven Earth system science. Nature, 566:195–204, 2019.
Richardson, C. W. Stochastic simulation of daily precipitation, temperature, and solar radiation. Water Resources Research, 17(1):182–190, 1981.
Ridwan, W. M., Sapitang, M., Aziz, A., Kushiar, K. F., Ahmed, A. N., and El-Shafie, A. Rainfall forecasting model using machine learning methods: Case study Terengganu, Malaysia. Ain Shams Engineering Journal, 12(2), 2021.
Roberts, D. R., Bahn, V., Ciuti, S., Boyce, M. S., Elith, J., Guillera-Arroita, G., Hauenstein, S., Lahoz-Monfort, J. J., Schröder, B., Thuiller, W., Warton, D. I., Winkle, B. A., Hartig, F., and Dormann, C. F. Cross-validation strategies for data with temporal, spatial, hierarchical, or phylogenetic structure. Ecography, 40(8):913–929, 2017.
Schultz, M. G., Betancourt, C., Gong, B., Kleinert, F., Langguth, M., Leufen, L. H., Mozaffari, A., and Stadtler, S. Can deep learning beat numerical weather prediction? Philosophical Transactions of the Royal Society A, 379 (2194):20200097, 2021.
Seabold, S. and Perktold, J. Statsmodels: Econometric and statistical modeling with Python. In Proceedings of the 9th Python in Science Conference, pp. 92–96, 2010.
Shahid, S. Rainfall variability and the trends of wet and dry periods in Bangladesh. International Journal of Climatology, 30(15):2299–2313, 2010.
Shi, X., Chen, Z., Wang, H., Yeung, D.-Y., Wong, W.-k., and Woo, W.-c. Convolutional LSTM network: A machine learning approach for precipitation nowcasting. In Advances in Neural Information Processing Systems, volume 28, 2015.
Wilby, R. L., Wigley, T. M. L., Conway, D., Jones, P. D., Hewitson, B. C., Main, J., and Wilks, D. S. Statistical downscaling of general circulation model output: A comparison of methods. Water Resources Research, 34(11): 2995–3008, 1998.
Wilks, D. S. Statistical Methods in the Atmospheric Sciences. Elsevier, 4th edition, 2019.