Concepts / Domain Points and Labels

Domain Points and Labels

A training-data pair has exactly two identified roles: an input from X and a label from Y.

  • Programming

From Inputs to Training Data

Before a learner can use the information in a learning problem, it needs input. Training data is that input. It is not merely a collection of described objects: it is a finite sequence of examples in which every input is paired with a label.

Input xelement from X(x, y)one labeled exampleLabel yelement from Yinput partlabel part
What are the two parts of one training example, and how are the input and label connected?
Key point

A training-data pair has exactly two identified roles: an input from X and a label from Y.

Reading One Labeled Pair

The formal representation of training data is S = ((x₁, y₁), ..., (xₘ, yₘ)). Each parenthesized pair is one labeled training example. In every pair, xᵢ is the domain point, or input, and yᵢ is its label. The notation X × Y expresses that each pair contains one element from X together with one element from Y.

Worked example

Identifying the Parts of an Example

Consider one pair written as (x₁, y₁). Identify its input and its label.

  1. 1
    First part

    x₁ is the domain point or input. It comes from X.

  2. 2
    Second part

    y₁ is the label associated with that input. It comes from Y.

  3. 3
    Whole pair

    Together, (x₁, y₁) is one labeled training example.

Result

The first coordinate is the input from X, and the second coordinate is the label from Y.

Xinput domainxᵢone input(xᵢ, yᵢ)labeled exampleyᵢone labelYlabel domaincontainsinput coordinatecontainslabel coordinate
How does each training pair connect an element from X to an element from Y?

A Sequence of Examples

Training data contains more than one possible example: it is a finite sequence of labeled examples. The complete sequence is written as S, and its individual entries are the pairs (x₁, y₁) through (xₘ, yₘ). The pairs are the training examples; together, they make up the complete training data.

Scomplete training data(x₁, y₁)training example(x₂, y₂)training example(xₘ, yₘ)training examplecontainsfollowed bycontinues to
What does the complete training-data sequence look like, and how are its individual labeled examples arranged?
In the real world

Suppose described papayas are used as inputs. Color and softness describe each papaya, while tastiness is the result associated with that described example. A described papaya together with its tastiness label forms one labeled pair. Several such pairs form the training data.

Names for the Collection

The words training data and training set refer to the complete collection S. A training example refers to one individual labeled pair inside that collection. This gives a useful level distinction: one pair is an example, while all the pairs together are the training set or training data.

Training data Scomplete collectionTraining setanother name for S(xᵢ, yᵢ)one training examplealso calledcontains
How does one training example relate to the collection called a training set or training data?

Labels Versus Inputs Alone

A collection containing only inputs has domain points but does not show the labels associated with those points. Labeled training data has a pair for each example: an input from X together with a label from Y. The structural difference is therefore the presence or absence of the second part of each example.

Labeled collectionpairs (xᵢ, yᵢ)xᵢinput from Xyᵢlabel from YInput collectioninputs onlyxᵢinput from Xcontainscontainscontains
What is the structural difference between a collection of labeled pairs and a collection containing only inputs?
CollectionEach entry containsStatus in this concept
Labeled training dataAn input from X and a label from YTraining data
Collection of inputs without labelsAn input from X onlyMissing the label part of a training-data pair

The defining structural difference is whether each input is paired with a label.

Common Identification Mistakes

  • Common mistake

    Calling one pair the entire training set.

    What it looks like

    Treating (x₁, y₁) as though it were all of S.

    Why it fails

    A training example is one individual labeled pair, while the training set or training data is the complete collection.

    Do this instead

    Use training example for one pair and training set or training data for the complete sequence S.

  • Common mistake

    Treating an input by itself as a labeled example.

    What it looks like

    Recording xᵢ without its associated yᵢ.

    Why it fails

    A labeled example requires both an input from X and a label from Y.

    Do this instead

    Check that every example is represented as a pair (xᵢ, yᵢ).

  • Common mistake

    Assuming that a larger collection of inputs is automatically training data.

    What it looks like

    Collecting more described papayas but not recording tastiness labels.

    Why it fails

    The collection becomes training data when the domain information is paired with labels.

    Do this instead

    Look for the label associated with each described input.

  • Common mistake

    Confusing the domains X and Y.

    What it looks like

    Describing both the input and the label as though they came from the same role.

    Why it fails

    The input comes from X, while the label comes from Y.

    Do this instead

    In each pair, identify the first coordinate as the input from X and the second as the label from Y.

Check Your Understanding

EASY

A collection is written as S = ((x₁, y₁), (x₂, y₂), (x₃, y₃)). Identify one training example, identify the complete training data, and state what would be missing if only x₁, x₂, and x₃ were recorded.

Hints
  • A training example is one parenthesized pair.
  • The complete training data is the whole sequence named S.
  • Compare an entry containing xᵢ and yᵢ with an entry containing xᵢ alone.
Worked example

Checking the Sequence

Use S = ((x₁, y₁), (x₂, y₂), (x₃, y₃)) to distinguish an example from the complete collection.

  1. 1
    Choose one pair

    (x₂, y₂) is one training example because it is one input-label pair.

  2. 2
    Identify the collection

    S is the complete training data, also called the training set.

  3. 3
    Remove the labels

    If only x₁, x₂, and x₃ remain, the entries no longer display the labels from Y, so the labeled-pair structure is absent.

Result

One pair is a training example; the complete sequence S is the training data or training set; inputs alone omit the label part.

Key Takeaways

  1. 1
    Training data is the learner's input and is a finite sequence of labeled examples.
  2. 2
    Each labeled example is a pair containing an input from X and a label from Y.
  3. 3
    The individual pairs are training examples; the complete collection S is the training data or training set.
  4. 4
    A collection of inputs without labels does not have the labeled-pair structure described by S.

At a glance

  • Training data is a finite sequence of labeled examples.
  • Each example has two parts: an input from X and a label from Y.
  • One pair is a training example, while the full sequence S is the training set or training data.
  • Inputs without their associated labels do not form the labeled training-data structure.

Related concepts

More concepts starting with D