https://singularityfeed.com/convex-and-concave-function-in-machine-learning/