AFFINE Construct affine (linear) mapping from parameters
W = AFFINE(R,OFFSET,LABLIST_IN,LABLIST_OUT,SIZE_IN,SIZE_OUT)
DescriptionThis is a low level basic PRTools routine, not intended for direct use. It defines a mapping W based on a linear transformation R and an offset. R should be a [K x L] matrix describing a linear transformation from a Kdimensional space to an Ldimensional space. If K=1, then R is interpreted as the diagonal of an [L x L] diagonal matrix. OFFSET is a row vector of the length L, added afterwards. Affine mappings are treated by PRTools in a special way. A scaling defined for an affine mapping, e.g. by W = SETSCALE(W,SCALE) is directly executed by a multiplication of the coefficients. Also, the product of two affine mappings is directly converted to a new affine mapping. This routine also executes W = AFFINE(W1,W2), if W1 and W2 are affine. B = AFFINE(A,W), if A is a dataset and W is an affine mapping. Finally, the transpose of an affine mapping exists and is defined as an another affine mapping. An [M x K] dataset A can be mapped as D = A*W. The result is equivalent to [+A, ones(M,1)]*[R; OFFSET]. The dataset D has feature labels stored in LABLIST. The number of this labels should, thereby, be at least L. See also
