Parallel combining |
By parallel combining sets of mappings are combined that operate from different input spaces into the same output space. The resulting mapping concatenates the output datasets. The combining operator is the vertical concatenation. Alternatively the command parallel may be used.
As an example consider three mappings W1
, W2
and W3
defined for different spaces in which the same set of objects is represented by the three datasets A1
, A2
and A3
. These datasets should contain the same numbers of objects and they should be aligned (row n
of A1
, A2
and A3
should refer to the same object). This may also be interpreted as a single dataset A
with k
features of which the first k1
construct a subspace for dataset A1
, followed by k2
features that construct the dataset A2
and with k3
features that construct dataset A3
, k = k1+k2+k3.
A = [A1 A2 A3];
The three separate mappings would result in
B1 = A1*W1; B2 = A2*W2; B3 = A3*W3;
The combined, concatenated output datasets
B = [B1 B2 B3];
can also be found from the parallel mapping W
W = [W1;W2;W3];
or
W = parallel(W1,W2,W3);
by
B = A*W;
In summary
B = A*W = [A1 A2 A3]*[W1;W2;W3] = [A1*W1 A2*W2 A3*W3] = [B1 B2 B3];
The user just has to supply B = A*W
. The remainder just shows what is done automatically by PRTools
. Note that the difference with stacked combining is that for parallel combining the base mappings W1
, W2
and W3
operate on predefined non-overlapping subsets of the features of A
, while in stacked combining they all operate on all features.
Parallel combining can also be applied to to untrained mappings. In that case, however, it is necessary that the dimensionalities of the spaces to be combined are stored in the combiner. This may be done by an additional parameter in the parallel command, which is used for the overload of the vertical concatenation operator [...; ...; ...]. It defines the feature sizes of the subsets of the input dataset A
. So training can be programmed as
D = [A1 A2 A3]; % concatenated spaces U = [U1; U2; U3]; % define untrained combiner U = parallel(U,[size(A1,2),size(A2,2),size(A3,2)]); % store space dimensions W = D*U; % training, results in [A1*U1; A2*U2; A3*U3] = [W1; W2; W3]
In the more recent versions of PRTools
(after 4.2.2) the subspace dimensionalities are automatically stored in the dataset concatenation (by a subfield featsets
in the user
-field). Consequently users may directly write:
W = [A1 A2 A3]*[U1; U2; U3];
R.P.W. Duin
, January 28, 2013Parallel combining |