liveBook · Manning

Discriminative model

As explained in Learn Generative AI with PyTorch

A model that learns to predict labels from inputs by estimating conditional probabilities and decision boundaries between classes.

A discriminative model recognizes and categorizes existing content by learning how input features distinguish among classes. It estimates conditional probabilities such as P(Y|X), then assigns the label with the highest predicted probability. section 1.1 section 1.1.1

Unlike a generative model, which learns a joint distribution to create new instances, a discriminative model focuses on the boundary between labels rather than synthesizing content. section 1.1.1

A typical classification task proceeds as follows:

  • Provide an input, such as an image containing a dog or cat. section 1.1.1
  • Use distinguishing features, such as small noses or pointy ears, to estimate Prob(dog) and Prob(cat). section 1.1.1
  • Choose the label with the highest predicted probability. section 1.1.1
Figure 1.1 A comparison of generative models versus discriminative models. A discriminative model (top half of the figure) takes data as inputs and produces probabilities of different labels, which we denote by Prob(dog) and Prob(cat). In contrast, a generative model (bottom half) acquires an in-depth understanding of the defining characteristics of these images to synthesize new images representing dogs and cats.

Compare the input-to-label workflow of discriminative models with the content-generation workflow of generative models. section 1.1.1

How Learn Generative AI with PyTorch covers it

How deep it goes
Defines conditional probabilities and class boundaries through a dog-versus-cat example, without developing implementation internals.
Examples
Uses dog-and-cat images, distinguishing facial features, and competing Prob(dog) and Prob(cat) outputs.
What you can do after
Evaluate/understand how input features become class probabilities and labels.
How it connects
Contrasts discriminative models with generative models and connects them to classification, conditional probability, and joint probability distributions.

Also explained in

Compare how 4 books explain discriminative model →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Generative AI with PyTorch. The section links point to the parts of the book it draws on.