Online machine-learning forecast uncertainty estimation for sequential data assimilation