A team trains a CNN on a dataset of images that are each labeled either "cat" or "dog," and the network learns to predict that label for new images. What type of machine learning task is this?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Let's break down what's actually happening here: every training image comes with a label already attached — "cat" or "dog" — and the network's whole job is to learn the mapping from pixels to that label. That's the textbook definition of supervised learning, and because the output is one of a fixed set of categories, it's specifically supervised classification. That's your answer. Unsupervised clustering is out because clustering never sees labels — it just finds structure in unlabeled data. Reinforcement learning is out because there's no agent taking actions in an environment and collecting rewards over time, just a static labeled dataset. And dimensionality reduction is a different animal entirely — sure, a CNN builds internal feature maps, but that's a means to the end, not the task itself. The task here is prediction against ground-truth labels, full stop.
Full explanation below image
Full Explanation
This scenario describes supervised classification because the dataset provides ground-truth labels ("cat" or "dog") for every training example, and the CNN's objective is to learn a function that maps input images to those discrete, predefined categories. The presence of labeled targets during training is the defining characteristic of supervised learning, and because the target variable is categorical rather than continuous, the specific task is classification (as opposed to regression).
The unsupervised clustering option is incorrect because unsupervised methods never have access to labels; they discover latent groupings or structure purely from the input data's statistical properties. If the cat/dog labels were withheld and the model simply grouped visually similar images, that would be clustering — but that is not what is described here, since explicit labels drive training.
The reinforcement learning option is incorrect because RL involves an agent that takes sequential actions within an environment and learns from delayed reward signals accumulated over time, adjusting a policy to maximize cumulative reward. There is no environment, no sequential decision-making, and no reward signal in this static image-labeling setup — just direct supervised feedback comparing predictions to fixed labels.
The dimensionality reduction option is incorrect because that describes a different objective altogether: compressing high-dimensional data into a lower-dimensional representation while preserving important structure (as PCA or an autoencoder's bottleneck layer does). While it is true that CNNs build hierarchical feature representations internally, that is an architectural mechanism in service of classification, not the stated goal of the task.
Memory aid: if you have labeled examples and a discrete set of output categories, it is supervised classification; if labels are absent, it is unsupervised; if there is an agent acting and earning rewards over time, it is reinforcement learning; if the goal is representation size reduction rather than prediction, it is dimensionality reduction.