Near-optimal learning with average Hölder smoothness