a first implementation of the Adagrad algorithm