HOME Parallel combining Mapping combining Dyadic combiningSequential combining

Sequential combining

In sequential combining a set of consecutive mappings W1, W2, ... on a dataset A is combined into a single one. For example

    B = A*W1;
    C = B*W2;
    D = C*W3;

may also be written as

    W = W1*W2*W3;
    D = A*W;

It is of course needed that the output dimensionality of a mapping is identical to the input dimensionality of the next one.

PRTools programmers should realize that sequential mappings are stored in pairs. So, in the above example W is stored and executed internally as

    W = (W1*W2)*W3;

as Matlab operates from left to right. Except for numerical inaccuracies this is equivalent to

    W = W1*(W2*W3);

Sequential combining is executed by the sequential command. The *-operator applied to mappings uses this command, so their is no need for users to call it explicitly. In general sequential just stores the two mappings and executes them sequentially if it is applied to data. There is one exception. If the two mappings are both affine transformations, they are directly combined into a single affine mapping.

Different types of mappings can be combined in the above way. In particular, it is possible to combine untrained mappings with trained or fixed mappings. If one of the mappings is untrained, the sequential combination is untrained. If this combination is trained by some dataset, each of the constituent untrained mappings is trained in the appropriate order, taking into account other trained or fixed mappings in the sequence. Finally a mapping is returned that can handle objects from the same collection as the training set is taken from. For example

    [T,S] = gendat(A); %  Generate a training set T and a test set S from A
    U = sigm*loglc     % Sequential mapping to be trained
    W = T*U            % training

is inside PRTools evaluated by

    R = T*sigm         % map training set to transformed space
    V = R*logc         % train classifier in this space
    W = sigm*V         % return mapping suitable for directly handling S

Users can thereby directly call D=S*W which is evaluated inside PRTools by D=S*sigm*V. This maps the test set first into the transformed space and applies it to the classifier V which is trained in that space. In a one-liner the training and testing can be written as:

    D = S*(T*(sigm*loglc));

The brackets are essential as they determine the order of evaluation.

In the below table the internal evaluation rules of A*(V*U) are listed for the dataset A applied to all sequential combinations of the mappings V and U. Depending on the mapping types of V and U this results either in a mapping W or in a dataset B.

V untrained V trained V fixed
U untrained W=A*V*(A*(A*V)*U) W=V*(A*V*U) W=V*(A*V*U)
U trained W=A*V*U B=A*V*U B=A*V*U
U fixed W=A*V*U B=A*V*U B=A*V*U
U combiner W=A*(V*U) B=A*(V*U) B=A*(V*U)


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


HOME Parallel combining Mapping combining Dyadic combiningSequential combining