Importance sampling for online variational learning