DisTools introductory 2D example, non-Euclidean dissimilarities

Get rid of old figures, generate a trainset and a testset and give them proper names

AT = setname(gendatb,'TrainSet')
AS = setname(gendatb,'TestSet')

Define a set of untrained classifiers all based on Fisher’s Linear Discriminant: in the original 2D feature space, in the dissimilarity space based on Euclidean (Minkowsky-2) distances, in a dissimilarity space based on squared Euclidean distances and in a dissimilarity space based on Minkowsky-1 (L1) distances. Give them proper names and train them by AT.

U1 = fisherc;
U2 = proxm([],'m',2)*fisherc;
U2 = setname(U2,'DisSpaceL2-1');
U3 = proxm([],'m',2)*mapm('power',2)*fisherc;
U3 = setname(U3,'DisSpaceL2-2');
U4 = proxm([],'m',1)*fisherc;
U4 = setname(U4,'DisSpaceL1');
W = AT*{U1,U2,U3,U4};

Show results in a scatter plot. By enlarging the gridsize (default setting is 30) to, e.g. 300, a more accurate plot is obtained. However, plotting may take considerably more time.

gridsize 300


Classify trainset and testset and show results.


Finally you may have a look at the long spiral experiment:


Return to DisTools Introductory Examples Continue with next DisTools Example
Print Friendly, PDF & Email