liveBook · Manning

Category

As explained in Deep Learning with R, Third Edition

A class is a discrete category assigned to an example in a classification problem.

A category, or class, is one discrete option in a classification problem. Each sample receives a label identifying its associated class, such as a digit or news topic. section 2.1 section 4.0

Handwritten digits

MNIST classifies 28×28 grayscale images into ten classes, 0 through 9. A Keras model returns ten probabilities for an image; the class with the largest probability becomes the predicted class. section 2.1

Distinguish the related terms:

  • A class is a possible category; a label is the particular class annotation attached to one sample. section 4.0
  • A prediction is the model output, while the target is the class the model should ideally produce. section 4.0
  • For multiclass output, probabilities form a distribution across all classes, and the largest entry identifies the predicted class. section 4.2.5
predictions <- model |> predict(x_test)

Inspect the prediction matrix returned by Keras before selecting the highest-probability class. section 4.2.5

How Deep Learning with R, Third Edition covers it

How deep it goes
Defines classes, labels, and predicted classes, then demonstrates probability inspection and maximum-selection without covering classifier internals.
Examples
Demonstrates handwritten-digit classes in MNIST and topic classes in newswire classification.
What it assumes
Introduces classification vocabulary and a Keras workflow without requiring prior Keras or similar-library experience.
What you can do after
Apply Keras predictions by reading class probabilities and selecting the highest-probability class.
How it connects
Connects classes with classification, labels, samples, targets, predictions, and probability distributions.

Also explained in

Compare how 3 books explain category →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with R, Third Edition. The section links point to the parts of the book it draws on.