PRTools Contents

PRTools User Guide

affine

AFFINE

Construct affine (linear) mapping from parameters

    W = AFFINE(R,OFFSET,LABLIST_IN,LABLIST_OUT,SIZE_IN,SIZE_OUT)
    W = AFFINE(R,OFFSET,A)
    W = AFFINE(W1,W2)

Input
 R Matrix of a linear mapping from a K- to an L-dimensional space
 OFFSET Shift applied after R; a row vector of the length L (optional; default: zeros(1,L))
 LABLIST_IN Labels of the features of the input space  (optional; default: (1:K)')
 LABLIST_OUT Labels of the features of the output space, e.g. class names  for linear classifiers (optional; default: (1:L)')
 SIZE_IN If based on images: size vector of the input dimensionality  (optional; default: K)
 SIZE_OUT If based on images: size vector of the output dimensionality  (optional; default: L)
 A Dataset (LAB_IN_LIST and SIZE_IN are derived from A)
 W1,W2 Affine mappings

Output
 W Affine mapping

Description

This 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 K-dimensional space to an L-dimensional 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

datasets, mappings,

PRTools Contents

PRTools User Guide

This file has been automatically generated. If badly readable, use the help-command in Matlab.