concept field in category machine learning

appears as: field, fields, field, The field, fields
Mahout in Action

This is an excerpt from Manning's book Mahout in Action.

By default, the implementation assumes that all preference data exists in a table called taste_preferences, with a column for user IDs named user_id, a column for item IDs named item_id, and column for preference values named preference. This schema is illustrated in table 3.1. This table could also contain a field called timestamp, whose type should be compatible with Java’s long type.

The terminology used by different people to describe classification is highly variable. For consistency, we’ve limited the terms used for key ideas in the book. Many of these terms are listed in table 13.2. Note, in particular, the relationship between a record and a field: the record is the repository for values related to a training example or production example, and a field is where the value of a feature is stored for each example. The key ideas listed in this table are discussed in the subsections that follow.

Table 13.2. Terminology for the key ideas in classification

Key idea

Description

Model A computer program that makes decisions; in classification, the output of the training algorithm is a model.
Training data A subset of training examples labeled with the value of the target variable and used as input to the learning algorithm to produce the model.
Test data A withheld portion of the training data with the value of the target variable hidden so that it can be used to evaluate the model.
Training The learning process that uses training data to produce a model. That model can then compute estimates of the target variable given the predictor variables as inputs.
Training example An entity with features that will be used as input for learning algorithm.
Feature A known characteristic of a training or a new example; a feature is equivalent to a characteristic.
Variable In this context, the value of a feature or a function of several features. This usage is somewhat different from the use of variable in a computer program.
Record A container where an example is stored; such a record is composed of fields.
Field Part of a record that contains the value of a feature (a variable).
Predictor variable A feature selected for use as input to a classification model. Not all features need be used. Some features may be algorithmic combinations of other features.
Target variable A feature that the classification model is attempting to estimate: the target variable is categorical, and its determination is the aim of the classification system.

In the following subsections, we look more closely at what a model is and how it’s trained, tested, and used in production. You’ll learn how to distinguish predictor variables from target variables, understand how to correctly make use of records, fields, and values, and see the four forms of values that variables can take. In addition, you’ll see that Mahout classification is an example of supervised learning.

Now you must select the features for use as predictor variables. What features can you describe appropriately? Color-fill is out (it’s the target variable) but you can use position or shape as variables. You could describe position by the x and y coordinates. From a table of the data, you can create a record for each example that includes fields for the target variable and for the predictor variables you’re considering. A record for two of the training examples is shown in figure 13.5. (The complete data for this sample can be found in the examples module of the Mahout source code.)

Figure 13.5. Two records for training data. The records for data shown in figure 13.4 have fields that store the values of the target variable and fields for the values of the predictor variables. In this case, values relating to position (x, y coordinates) and shape have been included for each of the two examples.

The record for each training example will have fields to store values for the target variable and for one or more features chosen as predictor variables, as illustrated in figure 13.3. The field for the target variable in a production example is, of course, the unknown value that’s being sought by the classification algorithm. The output of the model in production is the value estimated for the target variable, denoted in the figure by T. There is one output for each input example.