xtrain: Matrix of size ntrain x d, containing the values of the d attributes for the training data.
ytrain: Vector of class labels for the training data (of length ntrain). May be a factor, or a vector of integers from 1 to M (number of classes).
xtst: Matrix of size ntst x d, containing the values of the d attributes for the test data.
K: Number of neighbors.
ytst: Vector of class labels for the test data (optional). May be a factor, or a vector of integers from 1 to M (number of classes).
param: Parameters, as returned by EkNNfit.
Returns
A list with three elements:
m: Predicted mass functions for the test data. The first M columns correspond to the mass assigned to each class. The last column corresponds to the mass assigned to the whole set of classes.
ypred: Predicted class labels for the test data (coded as integers from 1 to M).
err: Test error rate.
Details
If class labels for the test set are provided, the test error rate is also returned. If parameters are not supplied, they are given default values by EkNNinit.
T. Denoeux. A k-nearest neighbor classification rule based on Dempster-Shafer theory. IEEE Transactions on Systems, Man and Cybernetics, 25(05):804--813, 1995.
L. M. Zouhal and T. Denoeux. An evidence-theoretic k-NN rule with parameter optimization. IEEE Transactions on Systems, Man and Cybernetics Part C, 28(2):263--271,1998.