-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbong-slides.md~
More file actions
772 lines (501 loc) · 18.9 KB
/
bong-slides.md~
File metadata and controls
772 lines (501 loc) · 18.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
---
layout: cover
# background: ./images/bone-wall.png
class: text-center
title: BONE
mdc: true
---
# (B)ayesian (O)nline learning in (N)on-stationary (E)nvironments
**Gerardo Duran-Martin**, Leandro Sánchez-Betancourt, Alexander Shestopaloff, and Kevin Murphy
---
## What is BONE?
Framework that encompasses many Bayesian models that *tackle* online learning in non-stationary environments.
* By *Bayesian* we mean using Bayes' rule to update beliefs.
* By *online* we mean observing a stream of datapoints and making a decision about the next datapoint.
* By *non-stationary* we mean that the data generating process (DGP) changes through time.
---
# Online learning and prediction
Observe sequence of features $x_t$ and observations $y_t$:
$$
{\cal D}_{1:t} = \{(x_1, y_1), \ldots, (x_t, y_t)\}.
$$
Given $x_{t+1}$, make a prediction
$$
\hat{y}_{t+1} = \omega(x_{t+1}, {\cal D}_{1:t}).
$$
Variables $x_t$ and $y_t$ can live in different time frames.
---
## (Unsupervised) online sequential learning
Estimating unobservable quantities of interest from the data.
1. Filtering --- estimate value of *latent* process.
2. Segmentation --- partition the data into non-overlapping bins.
3. Switching state-space models (Switching SSMs) --- categorise current observation into a number of possible states.
---
## (Supervised) online sequential learning (and prediction)
Predicting a measurable outcome $y_t$
1. Online continual learning.
2. Bandits.
3. One-step-ahead (prequential) forecasting.
4. Reinforcement learning (TD learning).
---
## Bayes for sequential online learning
$$
\hat{y}_{t+1}
= \mathbb{E}[h(\theta_t; x_{t+1}) \vert {\cal D}_{1:t}]
= \int
\underbrace{h(\theta_t; x_{t+1})}_\text{measurement fn.}
\overbrace{p(\theta_t; {\cal D}_{1:t})}^\text{posterior density}
\,{\rm d}\theta_t.
$$
---
## Sequential classification
A running example

---
layout: center
---
## Choice of measurement model (M.1)
Inductive bias on the observations given parameters $\theta$ and features $x_t$.
---
## Choice of measurement model (M.1)
In the linear setting:
$$
h(\theta, x) =
\begin{cases}
\theta^\intercal\,x & \text{linear regression},\\
\sigma(\theta^\intercal\,x) & \text{logistic regression}.
\end{cases}
$$
In the non-linear classification setting,
$$
h(\theta, x) = \sigma(\phi_\theta(x)),
$$
with $\phi_\theta: \reals^M \to \reals$ a neural network with real-valued output unit.
Then $p(y_t \vert x_t) = {\rm Bern}(y_t \vert h(\theta, x))$
---
layout: center
---
## Weight over model parameters (A.1) --- Bayes
Assume that observations $y_{1:t}$ are conditionally independent given $\theta$.
$$
p(\theta | {\cal D}_{1:t}) \propto p(\theta)\,\prod_{k=1}^t p(y_t \vert \theta, x_t).
$$
In most cases, we cannot compute the posterior. We resort to either sample-based methods or approximations.
---
## Variational Bayes methods
Suppose $p(\theta) = {\cal N}(\theta \vert \mu_0, \Sigma_0)$
$$
\mu_t, \Sigma_t = {\bf D}_\text{KL}\left(
{\cal N}(\theta\,|\,\mu, \Sigma) \|
{\cal N}(\theta \vert \mu_{0}, \Sigma_{0})\,\prod_{k=1}^t p(y_k | \theta, x_k).
\right)
$$
---
layout: center
---
## Weight over model parameters (A.1) --- sequential Bayes
$$
p(\theta | {\cal D}_{1:t}) \propto p(\theta | {\cal D}_{1:t-1}) p(y_t \vert \theta, x_t).
$$
---
## (Recursive) variational Bayes methods
Suppose
$p(\theta \vert {\cal D}_{1:t-1}) = {\cal N}(\theta \vert \mu_{t-1}, \Sigma_{t-1})$:
$$
\mu_t, \Sigma_t = {\bf D}_\text{KL}
\left(
{\cal N}(\theta\,|\,\mu, \Sigma) \|
{\cal N}(\theta \vert \mu_{t-1}, \Sigma_{t-1})\,p(y_t | \theta, x_t)
\right).
$$
---
## Moment-matched linear Gaussian (LG)
First-order approximation of the choice of modelling function (M.1) around the previous mean $\mu_{t-1}$:
$$
h(\theta, x) \approx \bar{h}_t(\theta, x) = H_t\,(\theta_t - \mu_{t-1}) + h(\mu_{t-1}, x_t).
$$
$$
p(y_t \vert \theta, x_t) \approx
{\cal N}(y_t\,\vert\,\hat{y}_t, R_t),
$$
where
$$
\begin{aligned}
\hat{y}_t &= \mathbb{E}[\bar{h}(\theta_t, x_t) \vert {\cal D}_{1:t-1}] = h(\mu_{t-1}, x_t)\\
\end{aligned}
$$
and $R_t$ is the moment-matched variance of the observation process.
---
## Example: moment-matched linear Gaussian for classification
$$
\begin{aligned}
H_t &= \nabla_\theta h(\mu_{t-1}, x_t) & \text{(Jacobian)}\\
\hat{y}_t & = h(\mu_{t-1}, x_t) & \text{ (one-step-ahead prediction)} \\
R_t &= \hat{y}_t\,(1 - \hat{y}_t) & \text{ (moment-matched variance)}\\
\Sigma_t^{-1} &= \Sigma_{t-1}^{-1} + H_t^\intercal\,R_t^{-1}\,H_t & \text{(posterior precision)}\\
{\bf K}_t &= \Sigma_{t}\,H_t\,{R}_t^{-1} & \text{(Gain matrix)}\\
\hline
\mu_t &\gets \mu_{t-1} + {\bf K}_t\,(y_t - \hat{y}_t) & \text{(update)}
\end{aligned}
$$
---
## Sequential Online classification
* Online Bayesian learning using (M.1) a single hidden-layer neural network and (A.1) moment-matched LG.

---
## Online learning --- (M.1) and (A.1)
* The methods above (LG and VB) assume that the data-generating process is fixed / known.
* Mean estimate $\mu_T$ under LG converges to a point estimate as $T \to \infty$ regardless of error, i.e., $\Sigma_T \to 0 {\bf I}$.
* They are sequential, but do not have a *notion* of non-stationarity (model misspecification).
---
# Changes in the data-generating process
When more data does not lead to better performance.
Could be due to:
1. Not enough model capacity,
2. misspecified measurement model / lack of additional information.
---
## Non-stationary moons dataset

---
## The full dataset (without knowledge of the task boundaries)
{style="max-width: 50%"}
---
## Constant moment-matched LG updates --- non-stationary moons

---
## Recap: tools for sequential learning
* (M.1) A model for observations (conditioned on features $x_t$) --- $h(\theta, x_t)$.
* (A.1) An algorithm to weight choices of $\theta$ (conditioned on data ${\cal D}_{1:t}$) ---
$p(\theta\vert{\cal D}_{1:t}) \propto p(\theta \vert {\cal D}_{1:t-1}) p(y_t \vert \theta, x_t)$.
In many situations, (M.1) and (A.1) are not enough to *adapt* to regime changes.
---
# Tackling non-stationarity
1. Keep track of _regimes_ (M.2).
2. Act on our beliefs based on the regime (M.3).
3. Assign probability (weights) over possible regimes (A.2).
---
layout: center
---
# Tracking regimes through an auxiliary variable (M.2)
1. Denote $\psi_t$ the auxiliary variable.
1. The value of $\psi_t$ depends on how we _track_ regimes.
---
## Runlenght (RL)
* number of timesteps since the last changepoint (lookback window).
* $\psi_t = r_t$.

---
## Runlenght with changepoint count (RLCC)
* number of timesteps since the last changepoint (lookback window) and count of the number of changepoints.
* $\psi_t = (r_t, c_t)$.

---
## Changepoint location (CPL)
* Binary sequence of changepoint locations.
* $\psi_t = s_{1:t} \in \{0,1\}^t$.

---
## Changepoint location (CPL) alt.
* Binary sequence of values belonging to the current regime.
* $\psi_t = s_{1:t} \in \{0,1\}^t$.

---
## Changepoint probability (CPP)
* Changepoint probabilities.
* $\psi_t = \nu_t \in [0,1]$.

---
## Mixture of experts (ME)
* Choices of over a fixed number of models.
* $\psi_t = \alpha_t \in \{1, \ldots, K\}$.

---
## Constant \(C\)
* Single choice of model.
* $\psi_t = c$.

---
## Summary of auxiliary variables

---
layout: center
---
# (M.3) Modifying beliefs based on regime
* _Static_ recursive Bayes treats the prior as given and set at the begining of the experiment.
* Construct the posterior based on two modelling choices: a form for the prior and a form for the likelihood.
$$
\underbrace{\lambda(\theta; \psi_t, {\cal D}_{1:t})}_{\text{posterior}}
\propto
\underbrace{\tau(\theta\,\vert\,\psi_t, {\cal D}_{1:t-1})}_\text{parametrised by $\psi_t$}\,
\overbrace{p(y_t\,\vert\,\theta, x_t)}^\text{parametrised by $\theta$}
$$
---
## Choice of conditional prior (M.3) --- the Gaussian case
$$
\tau(\theta_t \vert \psi_t,\, {\cal D}_{1:t-1}) =
{\cal N}\big(\theta_t\vert g_{t}(\psi_t, {\cal D}_{1:t-1}), G_{t}(\psi_t, {\cal D}_{1:t-1})\big),
$$
* $g_t(\cdot, {\cal D}_{1:t-1}): \Psi_t \to \reals^m$ --- mean vector of model parameters.
* $G_t(\cdot, {\cal D}_{1:t-1}): \Psi_t \to \reals^{m\times m}$ --- covariance matrix of model parameters.
---
## `C-Static` --- constant update with static auxvar
* $\psi_t = c$.
* Classical (static) Bayesian update:
$$
\begin{aligned}
g_t(c, {\cal D}_{1:t-1}) &= \mu_{t-1}\\
G_t(c, {\cal D}_{1:t-1}) &= \Sigma_{t-1}\\
\end{aligned}
$$
---
## `RL-PR` --- runlength with prior reset
* $\psi_t = r_t$.
* Corresponds to the Bayesian online changepoint detection (BOCD) algorithm.
$$
\begin{aligned}
g_t(r_t, {\cal D}_{1:t-1}) &= \mu_0\,\mathbb{1}(r_t = 0) + \mu_{(r_{t-1})}\mathbb{1}(r_t > 0),\\
G_t(r_t, {\cal D}_{1:t-1}) &= \Sigma_0\,\mathbb{1}(r_t = 0) + \Sigma_{(r_{t-1})}\mathbb{1}(r_t > 0),\\
\end{aligned}
$$
where $\mu_{(r_{t-1})}, \Sigma_{(r_{t-1})}$ denotes the posterior belief using observations
from indices $t - r_t$ to $t - 1$.
$\mu_0$ and $\Sigma_0$ are pre-defined prior mean and covariance.
---
## `CPP-OU` --- changepoint probability with Ornstein-Uhlenbeck process
* $\psi_t = \upsilon_t$.
* Mean reversion to the prior as a function of the probability of a changepoint:
$$
\begin{aligned}
g(\upsilon_t, {\cal D}_{1:t-1}) &= \upsilon_t \mu_{t-1} + (1 - \upsilon_t) \mu_0 \,,\\
G(\upsilon_t, {\cal D}_{1:t-1}) &= \upsilon_t^2 \Sigma_{t-1} + (1 - \upsilon_t^2) \Sigma_0\,.
\end{aligned}
$$
---
## `CPL-sub` --- changepoint location with subset of data
* $\psi_t = s_{1:t}$.
$$
\begin{aligned}
g_t(s_{1:t}, {\cal D}_{1:t-1}) &= \mu_{(s_{1:t})},\\
G_t(s_{1:t}, {\cal D}_{1:t-1}) &= \Sigma_{(s_{1:t})},\\
\end{aligned}
$$
where $\mu_{(s_{1:t})}, \Sigma_{(s_{1:t})}$ denote the posterior beliefs using observations that are 1-valued.
---
## `C-ACI` --- constant with additive covariance inflation
* $\psi_t = c$.
* Random-walk assumption. _Inject_ noise at every new timestep. Special case of a linear state-space-model (SSM).
$$
\begin{aligned}
g_t(c, {\cal D}_{1:t-1}) &= \mu_{t-1},\\
G_t(c, {\cal D}_{1:t-1}) &= \Sigma_{t-1} + Q_t.\\
\end{aligned}
$$
Here, $Q_t$ is a positive semi-definitive matrix. Typically, $Q_t = \alpha {\bf I}$ with $\alpha > 0$.
---
# Tools for sequential learning (conditioned on regime)
* (M.1) A model for observations (conditioned on features $x_t$) --- $h(\theta, x_t)$.
* (M.2) An auxiliary variable for regime changes --- $\psi_t$.
* (M.3) A model for prior beliefs (conditioned on $\psi_t$ and data ${\cal D}_{1:t-1}$) ---
$\tau(\theta \vert \psi_t, {\cal D}_{1:t-1})$.
* (A.1) An algorithm to weight over choices of $\theta$ (conditioned on data ${\cal D}_{1:t}$) ---
$\lambda(\theta;\,\psi_t, {\cal D}_{1:t}) \propto \tau(\theta \vert \psi_t, {\cal D}_{1:t-1}) p(y_t \vert \theta, x_t)$.
---
## A prediction conditioned on $\psi_t$
$$
\hat{y}_{t+1}^{(\psi_t)}
= \mathbb{E}_{\lambda_t}[h(\theta_t;\, x_{t+1}) \vert \psi_t]
:= \int h(\theta_t;\, x_{t+1})\,\lambda(\theta_t;\,\psi_t, {\cal D}_{1:t})d \theta_t\,.
$$
(A.2) An algorithm to weight over choices of $\psi_t \in \Psi_t$.
---
## Aggregate predictions
$$
\begin{aligned}
\hat{y}_{t+1}
&= \int\left(\int h(\theta_t;\, x_{t+1})\,\lambda_t( \theta_t;\,\psi_t, {\cal D}_{1:t})\, d \theta_t\right)\,\nu_t(\psi_t)\,d\psi_t\\
&= \int \hat{y}_{t+1}^{(\psi_t)}\,\nu_t(\psi_t)\,d\psi_t\\
&=: \mathbb{E}_{\nu_t}\Big[\, \mathbb{E}_{\lambda_t}[h(\theta_t;\, x_{t+1}) \vert \psi_t ] \,\Big]\,.
\end{aligned}
$$
---
layout: center
---
## (A.2) Weighting function for auxiliary variables
Bayesian, loss-based, ad-hoc.
---
## (A.2) The recursive Bayesian choice
$$
\begin{aligned}
\nu_t(\psi_t)
&= p(\psi_t \vert {\cal D}_{1:t})\\
&=
p(y_t \vert x_t, \psi_t, {\cal D}_{1:t-1})\,
\int_{\psi_{t-1} \in \Psi_{t-1}}
p(\psi_{t-1} \vert {\cal D}_{1:t-1})\,
p(\psi_t \vert \psi_{t-1}, {\cal D}_{1:t-1}) d \psi_{t-1},
\end{aligned}
$$
For some $\psi_t$ and $p(\psi_t \vert \psi_{t-1})$, this method yields recursive update methods.
---
## (A.2) A loss-based approach
Suppose
$\psi_t = \alpha_t \in \{1, \ldots, K\}$, take
$$
\nu_t(\alpha_t) = 1 - \frac{\ell(y_{t+1}, \hat{y}_{t+1}^{(\alpha_t)})}
{\sum_{k=1}^K \ell(y_{t+1}, \hat{y}_{t+1}^{(k)})},
$$
with $\ell$ a loss function (lower is better).
---
## (A.2) An empirical-Bayes (point-estimate approach)
For $\psi_t = \upsilon_t \in [0,1]$,
$$
\upsilon_t^* = \argmax_{\upsilon \in [0,1]} p(y_t \vert x_t, \upsilon, {\cal D}_{1:t-1}).
$$
Then,
$$
\nu(\upsilon_t) = \delta(\upsilon_t = \upsilon_t^*).
$$
---
layout: center
---
# BONE --- Bayesian online learning in non-stationary environments
* (M.1) A model for observations (conditioned on features $x_t$) --- $h(\theta, x_t)$.
* (M.2) An auxiliary variable for regime changes --- $\psi_t$.
* (M.3) A model for prior beliefs (conditioned on $\psi_t$ and data ${\cal D}_{1:t-1}$) ---
$\tau(\theta \vert \psi_t, {\cal D}_{1:t-1})$.
* (A.1) An algorithm to weight over choices of $\theta$ (conditioned on data ${\cal D}_{1:t}$) ---
$\lambda(\theta;\,\psi_t, {\cal D}_{1:t}) \propto \tau(\theta \vert \psi_t, {\cal D}_{1:t-1}) p(y_t \vert \theta, x_t)$.
* (A.2) An algorithm to weight over choices of $\psi_t$ (conditioned on data ${\cal D}_{1:t}$).
---
# Back to the non-stationary moons example
Consider three combinations algorithms
1. Runlenght with prior reset and a single hypothesis --- `RL[1]-PR`.
2. Changepoint probability with OU dynamics --- `CPP-OU`.
3. Constant auxiliary variable with additive covariance inflation --- `C-ACI`.
Our choice of measurement model is a single hidden layer neural network
with linearised moment-matched Gaussian.
---
## RL[1]-PR
* When changepoint detected: reset back to initial weights
$$
\begin{aligned}
g_t(r_t, {\cal D}_{1:t-1}) &= \mu_0\,\mathbb{1}(r_t = 0) + \mu_{(r_{t-1})}\mathbb{1}(r_t > 0),\\
G_t(r_t, {\cal D}_{1:t-1}) &= \Sigma_0\,\mathbb{1}(r_t = 0) + \Sigma_{(r_{t-1})}\mathbb{1}(r_t > 0).\\
\end{aligned}
$$
{style="transform: translate(-50%, -20%)"}
---
## CPP-OU
* Revert to initial weights proportional to the probability of a changepoint
$$
\begin{aligned}
g(\upsilon_t, {\cal D}_{1:t-1}) &= \upsilon_t \mu_{t-1} + (1 - \upsilon_t) \mu_0 \,,\\
G(\upsilon_t, {\cal D}_{1:t-1}) &= \upsilon_t^2 \Sigma_{t-1} + (1 - \upsilon_t^2) \Sigma_0\,.
\end{aligned}
$$
{style="transform: translate(-50%, -20%)"}
---
## C-ACI
* Constantly forget past information.
$$
\begin{aligned}
g_t(c, {\cal D}_{1:t-1}) &= \mu_{t-1},\\
G_t(c, {\cal D}_{1:t-1}) &= \Sigma_{t-1} + Q_t.\\
\end{aligned}
$$
{style="transform: translate(-50%, -20%)"}
---
# Sequential classification --- comparison
In-sample hyperparameter optimisation.

---
## Unified view of examples in the literature

---
layout: center
---
# Creating a new combination
---
## RL[1]-OUPR --- choice of (M.2) and (M.3)
Choice of (M.2)
* Lookback windows are common in e.g., finance --- single runlength (`RL[1]`) as choice auxiliary variable.
Choice of (M.3)
* Reset if the hypothesis of a a changepoint is below some thresold $\varepsilon$.
* OU-like reversion rate otherwise.
$$
g_t(r_t, {\cal D}_{1:t-1}) =
\begin{cases}
\mu_0\,(1 - \nu_t(r_t)) + \mu_{(r_t)}\,\nu_t(r_t) & \nu_t(r_t) > \varepsilon,\\
\mu_0 & \nu_t(r_t) \leq \varepsilon,
\end{cases}
$$
$$
G_t(r_t, {\cal D}_{1:t-1}) =
\begin{cases}
\Sigma_0\,(1 - \nu_t(r_t)^2) + \Sigma_{(r_t)}\,\nu_t(r_t)^2 & \nu_t(r_t) > \varepsilon,\\
\Sigma_0 & \nu_t(r_t) \leq \varepsilon.
\end{cases}
$$
---
## RL[1]-OUPR --- choice of (A.2)
* Posterior predictive ratio test
$$
\nu_t(r_t^{(1)}) =
\frac{p(y_t \vert r_t^{(1)}, x_t, {\cal D}_{1:t-1})\,(1 - \pi)}
{p(y_t \vert r_t^{(0)}, x_t, {\cal D}_{1:t-1})\,\pi + p(y_t \vert r_t^{(1)}, x_t, {\cal D}_{1:t-1})\,(1-\pi)}.
$$
Here, $r_{t}^{(1)} = r_{t-1} + 1$ and $r_{t}^{(0)} = 0$.
---
## Experiment: hourly electricity load
Seven features (lagged by one hour):
* pressure (kPa)
* cloud cover (\%)
* humidity (\%)
* temperature \(C\)
* wind direction (deg), and
* wind speed (KmH).
One target variable:
* hour-ahead electricity load (kW).
---
## Experiment: hourly electricity load
{style="max-width: 70%"}
---
## Electricity forecasting during _normal_ times

---
## Electricity forecasting before and after Covid _shock_

---
## Electricity forecasting

---
## Electricity forecasting results (2018-2020)

---
## Experiment --- heavy-tailed linear regression

---
## Heavy tailed linear regression (sample run)
{style="max-width: 70%" .horizontal-center}
---
# Even more experiments!
* Bandits.
* Online continual learning.
* Segmentation and prediction with dependence between changepoints.
See paper for details.
---
# Conclusion
We introduce a framework for Bayesian online learning in non-stationary environments (BONE).
BONE methods are written as instances of:
## Three modelling choices
* (M.1) Measurement model
* (M.2) Auxiliary variable
* (M.3) Conditional prior
## Two algorithmic choices
* (A.1) weighting over model parameters (posterior computation)
* (A.2) weighting over choices of auxiliary function
---
layout: end
---
[gerdm.github.io/posts/bone-slides](https://gerdm.github.io/posts/bone-slides)
[arxiv.org/abs/2411.10153](https://arxiv.org/abs/2411.10153)