7 Visualizing Data and Models

 

This chapter covers:

  • How to use tfjs-vis to perform custom visualization of data
  • Why it is important to visualize the model-training process and what are the important things to look for
  • How to visualize and understand underfitting and overfitting
  • The primary way of dealing with overfitting: regularization, and how to visualize its effect
  • How to peek at the internal workings of models after they are trained and gain useful insights

Visualization is an important skill for machine-learning practitioners, because it is involved in every phase of the machine-learning workflow. Before we build models, we examine our data by visualizing it; during model engineering and training, we monitor the training process through visualization; after the model is trained, we use visualization to get a sense about how it works.

In Chapter 6, you learned the benefits of visualizing and understanding data before applying machine learning on it. We described how to use Facets, a browser-based tool that helps you get a quick interactive look at your data. In this chapter, we will introduce a new tool, tfjs-vis, which helps you visualize your data in custom, programmatic ways. The benefit of doing so, versus just looking at the data in its raw format or using off-the-shelf tools such as Facets, is the more flexible and versatile visualization paradigm and the deeper understanding of data that it leads to.

7.1  Data visualization

7.1.1  Visualizing data using tfjs-vis

7.2  Visualizing model training

7.2.1  Formulation of the temperature-prediction problem

7.2.2  Underfitting, overfitting, and countermeasures

7.3  Visualizing models after training

7.3.1  Visualizing the internal activations of a convnet

7.3.2  Visualizing what convolutional layers are sensitive to: Maximally-activating images

7.3.3  Visual interpretation of a convnet’s classification result

7.4 Summary

Materials for further reading and exploration

7.5 Exercises

sitemap