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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.