knn - SOM Toolbox Online documentation

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
SOM Toolbox Online documentation http://www.cis.hut.fi/projects/somtoolbox/ knn [C,P]=knn(d, Cp, K) KNN K-Nearest Neighbor classifier using an arbitrary distance matrix [C,P]=knn(d, Cp, [K]) Input and output arguments ([]'s are optional): d (matrix) of size NxP: This is a precalculated dissimilarity (distance matrix). P is the number of prototype vectors and N is the number of data vectors That is, d(i,j) is the distance between data item i and prototype j. Cp (vector) of size Px1 that contains integer class labels. Cp(j) is the class of jth prototype. [K] (scalar) the maximum K in K-NN classifier, default is 1 C (matrix) of size NxK: integers indicating the class decision for data items according to the K-NN rule for each K. C(i,K) is the classification for data item i using the K-NN rule P (matrix) of size NxkxK: the relative amount of prototypes of each class among the K closest prototypes for each classifiee. That is, P(i,j,K) is the relative amount of prototypes of class j
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/23/2010 for the course CS 245 taught by Professor Dunno during the Spring '10 term at Aarhus Universitet.

Page1 / 2

knn - SOM Toolbox Online documentation

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online