Ranking and Complex Prediction Problems
The prediction task must choose which available category is assigned to the current instance.
From an Instance to a Category
Many prediction tasks begin with an instance and end with a category. A document may need a topic label, or an image may need an object label. When the possible answer is one of several categories, the task is called multiclass classification. The central question is which category from the available set should be assigned to the instance.
Multiclass classification means classifying an instance into one of several possible target classes.
Tracing the Prediction Inputs
Begin by separating the two sides of the task. The instance space X contains the possible inputs to the prediction. The target set Y contains the available target categories, and Y is finite. These collections are not the same kind of thing: X is the input side, while Y is the set of possible outputs.
Reading the Predictor h : X → Y
The formal goal is to learn a predictor h : X → Y. Read this as a rule that takes an instance from X and produces a target class from Y. The notation emphasizes the direction of the prediction: the input comes from the instance space, and the result belongs to the finite target set.
The notation h : X → Y does not describe a collection of possible outputs for one instance. It describes a predictor whose output is a target class in Y.
Tracing a Document Categorization
Document to Topic
Identify the instance space, the target set, and the predictor's role in document-topic categorization.
- 1Find the instance
The document is the instance being presented to the prediction task.
- 2Find the input space
The collection of possible documents forms the instance side, represented by X.
- 3Find the target set
The collection of possible topics forms the finite target category set, represented by Y.
- 4Apply the predictor
The predictor h takes the document as an input from X and assigns one topic category from Y.
The document belongs to X, the possible topics belong to Y, and h : X → Y represents assigning one available topic to the document.
The important separation is between the document collection and the topic collection. Documents are instances; topics are target categories. Treating both collections as if they were the same kind of object hides the direction of the prediction.
Why One Class Is Assigned
The word multiclass matters because the target set contains several possible categories. The prediction task must choose which available category is assigned to the current instance. Thus, the same structure combines two ideas: there are multiple possible target classes, and the instance receives one choice from that set.
Common Interpretation Mistakes
Common mistake Treating X and Y as the same collection.
What it looks likeCalling both the documents and the topics the target set.
Why it failsX contains instances, while Y is the finite set of target categories.
Do this insteadAsk first whether an item is an input instance or a possible output category.
Common mistake Reading h : X → Y as if h produced an item outside Y.
What it looks likeDescribing the predictor as returning an arbitrary result unrelated to the target categories.
Why it failsThe formal goal is a predictor from X to Y, so its output is a target class in Y.
Do this insteadTrace the notation from left to right: an instance from X is mapped to a class from Y.
Common mistake Forgetting that the task has several possible target classes.
What it looks likeExplaining classification only as assigning a category without identifying the available alternatives.
Why it failsMulticlass classification is classification into one of several possible target classes.
Do this insteadName the finite set of possible target categories before describing the assigned class.
Common mistake Assuming the example's instances and categories are interchangeable.
What it looks likeTreating a document topic as another document.
Why it failsThe source structure distinguishes the input side from the output side.
Do this insteadLabel documents or images as instances and topics or object labels as target categories.
Check Your Understanding
Consider image-object recognition. Identify what plays the role of an instance, what forms the finite target set Y, and what h : X → Y does for one image.
Hints
- Start with the item being examined: it is the instance.
- Then identify the possible object labels: they form the target categories.
- Describe the predictor as mapping the image to one available object label.
What do you think happens?
A document is given to a multiclass predictor. Before looking at the notation, which direction should the mapping follow?
Reveal answer
From an instance to a target category.
The formal goal is h : X → Y: X contains the instances and Y contains the finite set of target categories.
Essential Takeaways
- 1Multiclass classification assigns an instance to one of several possible target classes.
- 2X is the instance space: it contains the possible inputs, such as documents or images.
- 3Y is a finite set of target categories, such as topics or object labels.
- 4The predictor h : X → Y maps an instance from X to a target class from Y.
- 5The input collection and the target-category collection have different roles and should not be treated as the same kind of thing.
At a glance
- Multiclass classification chooses one target class from several possible classes.
- The instance space X contains inputs, while the finite target set Y contains available output categories.
- The predictor h : X → Y represents mapping each instance to a target class.
- Document-topic categorization and image-object recognition illustrate this structure.
- Always distinguish the input instances from the possible target categories.