PRTools contents

PRTools manual

kernelc

KERNELC

Arbitrary kernel/dissimilarity based classifier

    W = KERNELC(A,KERNEL,CLASSF)
    W = A*KERNELC([],KERNEL,CLASSF)

Input
 A Dateset used for training
 KERNEL untrained mapping to compute kernel by A*(A*KERNEL) for  training CLASSF or B*(A*KERNEL) for testing with dataset B, or
-  trained mapping to compute a kernel A*KERNEL for training
 CLASSF or B*KERNEL for testing with a dataset B
 KERNEL should be a functions like PROXM, KERNELM or USERKERNEL.  Default: reduced dissimilarity representation:  KERNELM([],[],'random',0.1,100);
 CLASSF Classifier used in kernel space, default LOGLC.

Output
 W Resulting, trained classifier

Description

This routine defines a classifier W in the input feature space based  on a kernel or dissimilarity representation defined by KERNEL and a  classifier CLASSF to be trained in the kernel space.

In case KERNEL is defined by V = KERNELM( ... ) this routine  is identical to W = A*(V*CLASSF), Note that if KERNEL is a mapping, it  may be trained as well as untrained. In the latter case A is used to  build the kernel space as well as to optimize the classifier (like in SVC).

Example(s)

 A = GENDATB([100 100]);    % Training set of 200 objects
 R = GENDATB([10 10]);      % Representation set of 20 objects
 V = KERNELM(R,'p',3);      % Compute kernel
 W = KERNELC(A,V,FISHERC)   % compute classifier
 SCATTERD(A);               % Scatterplot of trainingset
 HOLD ON; SCATTERD(R,'ko'); % Add representation set to scatterplot
 PLOTC(W);                  % Plot classifier

See also

datasets, mappings, kernelm, proxm, userkernel,

PRTools contents

PRTools manual