Efficient second-order methods for machine learning