Trainable K-Nearest Neighbour density estimation
W = KNNM(A,KNN)
D = B*W
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.
The mapping W may be applied to a new dataset B using DENSITY = B*W.