local.knn.cv: Local k-nearest neighbor method for label ranking.

View source: R/local.knn.cv.R

local.knn.cvR Documentation

Local k-nearest neighbor method for label ranking.

Description

Local k-nearest neighbor method with the parameter k determined using cross-validation error (defined as the sum of Kendall's distance).

Usage

local.knn.cv(dset,covariate.test,covariate,cv=10,k.max=20,method.cv="mean")

Arguments

dset

a ranking dataset for training the k-nearest neighbor.

covariate.test

the covariates of the judges to be predicted.

covariate

the covariates of the rankings.

cv

the number of cross-validated samples. The default value is 10.

k.max

the maximum number of nearest neighbors to be tested. The default value is 20.

method.cv

the prediction method. mean : mean rank, pl : Luce model

Author(s)

Paul H. Lee and Philip L. H. Yu

References

Cheng, W., Dembczynski, K., Hullermeier, E. (2010). Label ranking methods based on the Plackett-Luce model. Proceedings of ICML 2010.

See Also

local.knn

Examples

## create an artificial dataset
X1 <- c(1,1,2,2,3,3)
X2 <- c(2,3,1,3,1,2)
X3 <- c(3,2,3,1,2,1)
co <- c(6,5,4,3,2,1)
co.test <- 1.2
train <- data.frame(X1,X2,X3)

## local k-nearest neighbor method of the artificial dataset
## local.knn.cv(train,co.test,co)

pmr documentation built on June 24, 2022, 5:06 p.m.