Numerical Optimization With Applications To Machine Learning