PRTools contents |
PROXM
W = PROXM(A,TYPE,P,WEIGHTS)
W = A*PROXM([],TYPE,P,WEIGHTS)
Input | |
A | Dataset |
TYPE | Type of the proximity (optional; default: 'distance') |
P | Parameter of the proximity (optional; default: 1) |
WEIGHTS | Weights (optional; default: all 1) |
Output | |
W | Proximity mapping |
Computation of the [K x M] proximity mapping (or kernel) defined by the [M x K] dataset A. Unlabeled objects in A are neglected. If B is an [N x K] dataset, then D=B*W is the [N x M] proximity matrix between B and A. The proximities can be defined by the following types
'POLYNOMIAL' | 'P': SIGN(A*B'+1).*(A*B'+1).^P
'HOMOGENEOUS' | 'H': SIGN(A*B').*(A*B').^P
'EXPONENTIAL' | 'E': EXP(-(||A-B||)/P)
'RADIAL_BASIS' | 'R': EXP(-(||A-B||.^2)/(P*P))
'SIGMOID' | 'S': SIGM((SIGN(A*B').*(A*B'))/P)
'DISTANCE' | 'D': ||A-B||.^P
'MINKOWSKI' | 'M': SUM(|A-B|^P).^(1/P)
'CITY-BLOCK' | 'C': SUM(|A-B|)
'COSINE' | 'O': 1 - (A*B')/||A||*||B||
In the polynomial case for a non-integer P, the proximity is computed as D = SIGN(S+1).*ABS(S+1).^P, in order to avoid problems with negative inner products S = A*B'. The features of the objects in A and B may be weighted by the weights in the vector WEIGHTS.
PRTools contents |