How it works...

This results in a graph that shows the predicted best separator for the two classes among a histogram of the two separate data classes.

Figure 8: Visualization of the data and the end model, A. The two normal values are centered at -1 and 2, making the theoretical best split at 0.5. Here, the model found the best split very close to that number.

Get TensorFlow Machine Learning Cookbook - Second Edition 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.