Using premade estimators

Premade estimators are similar to the methods available in packages such as scikit-learn, where the input features and output labels are specified, along with the various hyperparameters. A method can then optimize for solving a loss function that is predefined to a default value but can be varied by passing a different function in a parameter.

Let's explore building the training and test datasets in the code:

  1. Import the relevant packages:
  1. Import the dataset. We will work on the MNIST dataset for this exercise:

The shapes of images and labels are as follows:

The premade function works on label value instead of ...

Get Hands-On Machine Learning on Google Cloud Platform 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.