HOME Mappings Mapping definitionMapping background

Mapping background


Mappings pave the way from object observations to the recognition of the pattern class they belong to. They define the normalization of the raw measurements, the extraction of the initial features, the reduction to a small, relevant feature set, the estimation of densities of classes or models, the transformation to the output space of a classifier, which can be posteriors, confidences or distances, and finally the selection of the most likely class. In every step a mapping procedure defines how input data is transformed into output data. In programming terms:

    output_data = mapping_procedure(input_data,parameters)

In PRTools input_data and output_data are usually a dataset or a datafile, but occasionally they may be an array of doubles (in which rows represent the objects), or even a set of scalars or a string. There are many mapping procedures available, e.g. procedures for measuring features in images, scaling and reducing dimensionality.


A very simple example of a mapping is the routine featsel which selects a pre-determined set of features. In the following example 10 objects in 5 dimensional space are generated. After that the feature 1, 2 and 5 are selected. The means before and after selection are computed and show to make clear what is going on.

    % generate 10 objects in 5D, mean is [1 2 3 4 5], small variances
    A = gauss(10,[1:5],0.01*eye(5));
    % show the rounded values of the mean of A
    % select features 1, 2 and 5
    B = featsel(A,[1 2 5]);
    % show the rounded values of the mean of B

This shows

     1     2     3     4     5
     1     2     5

as B contains just the features 1 2 5 of A.

An important property of the way mappings are implemented in PRTools is that the following statements are equivalent:

    B = featsel(A,[1 2 5]);
    B = A*featsel([],[1 2 5]);
    W = featsel([],[1 2 5]); B = A*W

which is realized by overloading the matrix multiplier * for mappings. It has to be read as a piping symbol: the dataset A is fed into the mapping procedure and replaces the placeholder [] as the first parameter. This only holds for a first parameter in a mapping routine in which instead of a dataset variable a [] is given.

The advantage of the construct in the last line of the above example is that a mapping, which is in fact a procedure, together with some chosen parameters, can be stored in a variable, there called W. This variable can be used as an input for other PRTools routines that operate on arbitrary mappings.

Mapping types

Mappings can be of the following types types:

Classifiers are a special kind of trainable mapping as they map feature data (input_data) on class labels (output_data) or on class confidences. As classifiers are the main tools of PRTools there is a separate section devoted to them. There is also a summary of all classifiers, as well as a summary of all all other mappings.

New users are advised to read first the introduction on mapping overloads. It introduces all specific operations defined for mappings.

R.P.W. Duin, January 28, 2013

HOME Mappings Mapping definitionMapping background