Learning the smoothness of noisy curves with application to online curve estimation