https://medium.com/@monocosmo77/working-with-nonsmooth-convex-functions-part2-machine-learning-2024-400a2f19897e