PRTools contents |
KERNELM
[W,J] = KERNELM(A,KERNEL,SELECT,P1,P2 , ...)
W = A*KERNELM([],KERNEL,SELECT,P1,P2 , ...)
K = B*W
Input | |
A,B | Datasets |
KERNEL | Untrained kernel / dissimilarity representation, a mapping computing proximities between objects. default: Euclidean dissimilarities: PROXM([],'d',1) |
SELECT | Name of object selection procedure, see below |
P1,P2, | ... Additional parameters for SELECT |
Output | |
W | Mapping |
J | Vector with indices of selected objects for representation |
K | Kernel matrix, dissimilarity representation, size [SIZE(B,1) LENGTH(J)] |
Computes the kernel mapping W for the representation objects in A. The computation of the kernel matrix, which is a proximity matrix (similarities or dissimilarities) should be defined in KERNEL by an untrained mapping like PROXM for predefined proximities or USERKERNEL for user specified proximities. A*KERNEL should 'train' the kernel, i.e. specify A as representation set. B*(A*KERNEL) should compute the kernel matrix: a dataset.
Initially, the kernel mapping has a size [SIZE(A,2) SIZE(A,1)]. For increased efficiency or accuracy the representation set may be reduced by a routine given by the string SELECT to select to objects J, using possibly additional parameters P1, P2, etcetera. This option of representation set reduction is the only difference between the use of KERNELM and routines like PROXM and USERKERNEL.
The following choices for SELECT are supported
'random' | random selection of P1 objects, maximum P2 |
'gendat' | [X,Y,J] = GENDAT(A,P1) |
'kcentres' | [LAB,J] = KCENTRES(DISTM(A),P1,P2) |
'modeseek' | [LAB,J] = MODESEEK(DISTM(A),P1) |
'edicon' | J = EDICON(DISTM(A),P1,P2,P3) |
'featsel' | J = +FEATSELM(A*KERNELM(A,TYPE,P),P1,P2,P3) |
A = GENDATB;
W = (SCALEM*KERNELM([],[],'random',5)*LOGLC);
SCATTERD(A)
PLOTC(A*W)
PRTools contents |