PRTools contents |
MAPPING
W = MAPPING(MAPPING_FILE,MAPPING_TYPE,DATA,LABELS,SIZE_IN,SIZE_OUT)
U = MAPPING(MAPPING_FILE,'untrained',PARS)
W = MAPPING(MAPPING_FILE,'combiner',PARS)
A mapping/classifier object W is constructed. It points to the command MAPPING_FILE that is able to execute the mapping. It may be used to map a dataset A on another dataset B by B = MAP(A,W) or by training a mapping using an untrained mapping U and a dataset A: W = MAP(A,U) or by modifying, (or combining) a mapping W with another mapping V: W_NEW = MAP(V,W); These operations may also be written as B = A*W, W = A*U or W_NEW = V*W.
As PRTools contains many predifined mappings there is no need for the starting user to define his own mappings. Advanced users may inspect simple examples like SIGM or SUBSC to see how they are constructed.
MAPPING_FILE | name of the routine used for defining, training or executing the mapping. Such a routine (e.g. 'mapfile'), typically a classifier or a data mapping, should generate a mapping W or U, and should also be able to accept and execute the following types of calls, generated by PRTools depending on the value of MAPPING_TYPE:
|
MAPPING_TYPE | string defining the type of mapping: 'untrained', 'trained', "combiner' or 'fixed', see above. Default is 'untrained'. MAPPING(MAPPING_FILE,DATA) is equivalent to MAPPING(MAPPING_FILE,'untrained',DATA) |
DATA | Data, structure or cell array necessary for defining the mapping, e.g. the weights of a neural network. DATA is just used in the MAPPING_FILE for executing the mapping. For fixed and untrained mappings DATA can only be a cell array. |
LABELS | Array with labels to be used as feature labels for the dataset resulting by executing the mapping. So at least as many labels as defined by SIZE_OUT has to be supplied. |
SIZE_IN | Input dimensionality or size vector describing its shape, e.g. in case the input space is derived from an image. For a classifier SIZE_IN is the feature size. |
SIZE_OUT | Output dimensionality or size vector describing its shape, e.g. in case the output space should represent an image. For a classifier SIZE_OUT is the number of classes. Default is the number of labels in LABELS. SIZE_IN and SIZE_OUT are just used for error checking. If SIZE_IN is not supplied they are both set to 0 and checking is skipped. |
W = MAPPING(MAPPING_FILE, MAPPING_TYPE, DATA, LABELS, ...
'field1',V1,'field2',V2, ...)
or by
W = MAPPING(MAPPING_FILE, MAPPING_TYPE, DATA, LABELS, SIZE_IN, ...
SIZE_OUT,'field1',V1,'field2',V2, ...)
The following fields are possible (if not set defaults are supplied)
SCALE | Output multiplication factor. If SCALE is a scalar all multiplied by it. SCALE may also be a vector with size as defined by SIZE_OUT to set separate scalings for each output. |
OUT_CONV | 0,1,2,3 for defining the desired output conversion: 0 - no(default), 1: SIGM, 2: NORMM or 3: SIGM and NORMM. These values are set by cnormc in case of 2-class discriminants (OUTCONV = 1) and by CLASSC (OUT_CONV = OUT_CONV+2) to convert densities and sigmoidal outputs to normalised posterior probabilities. |
COST | Classification costs in case the mapping defines a classifier. See SETCOST. |
NAME | String with mapping name |
USER | User definable variable |
W = SET(W,'field1',V1,'field2',V2, ...)
They may also be set by the routines SETMAPPING_FILE, SETMAPPING_TYPE, SETDATA, SETLABELS, SETSIZE_IN, SETSIZE_OUT, SETSIZE, SETSCALE, SETOUT_CONV, SETCOST, SETNAME and SETUSER. Fields may be retrieved by
VARARGOUT = GET(W,'field1','field2', ...)
or by the routines GETMAPPING_FILE, GETMAPPING_TYPE, GETDATA, GETSIZE_IN, GETSIZE_OUT, GETSCALE, GETOUTCONV, GETCOST, GETNAME and GETUSER.
PRTools contents |