Second order methods for optimisation problems in machine learning