Spatially Adaptive Online Prediction of Piecewise Regular Functions