Trainable K-Nearest Neighbour density estimation

W = KNNM(A,KNN) W = A*KNNM([],KNN) W = A*KNNM(KNN)

D = B*W

Input

A

Dataset used for training

B

Dataset used for evaluation

KNN

Number of nearest neighbours

Output

W

Density estimate

Description

A density estimator is constructed based on the k-Nearest Neighbour rule using the objects in A. In case A is labeled, density estimates are performed classwise and combined by the class priors. The default KNN is the square root of the size of the class. The data is scaled by variance normalisation determined by the training set.