How to do it...

  1. Let's assume we have a quadratic cost function and we find its minima:
  1. The cost function in statistical machine learning algorithms acts as a proxy for the level of difficulty, energy spent, or total error as we move around in our search space.


  1. The first thing we do is to graph the function and inspect it visually.
  1. Upon visual inspection, we see that   is a concave function with its minima at (2,1).
  1. Our next step would ...

Get Apache Spark 2.x Machine Learning Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.