The KernelKnn package extends the simple k-nearest neighborsalgorithm by incorporating numerous kernel functions and a variety ofdistance metrics. The package takes advantage of ‘RcppArmadillo’ tospeed up the calculation of distances between observations. More detailson the functionality of KernelKnn can be found in theblog-post andin the package Vignettes (scroll down for information on how to usethedocker image ).
To install the package from CRAN use,
install.packages("KernelKnn")and to download the latest version from Github use theinstall_github function of the devtools package,
devtools::install_github('mlampros/KernelKnn')Use the following link to report bugs/issues,
https://github.com/mlampros/KernelKnn/issues
UPDATE 29-11-2019
Docker images of theKernelKnn package areavailable to download from mydockerhubaccount. The images come withRstudio and theR-development version (latest) installed. The whole process wastested on Ubuntu 18.04. Topull &run the image do the following,
docker pull mlampros/kernelknn:rstudiodevdocker run-d--name rstudio_dev-e USER=rstudio-e PASSWORD=give_here_your_password--rm-p8787:8787 mlampros/kernelknn:rstudiodevThe user can alsobind a home directory / folder tothe image to use its files by specifying the-vcommand,
docker run-d--name rstudio_dev-e USER=rstudio-e PASSWORD=give_here_your_password--rm-p8787:8787-v/home/YOUR_DIR:/home/rstudio/YOUR_DIR mlampros/kernelknn:rstudiodevIn the latter case you might have first give permission privilegesfor write access toYOUR_DIR directory (notnecessarily) using,
chmod-R777/home/YOUR_DIRTheUSER defaults torstudio but you haveto give yourPASSWORD of preference (seehttps://rocker-project.org formore information).
Open your web-browser and depending where the docker image wasbuild / run give,
1st. Option on your personal computer,
http://0.0.0.0:87872nd. Option on a cloud instance,
http://Public DNS:8787to access the Rstudio console in order to give your username andpassword.
If you use theKernelKnn R package in your paper orresearch please citehttps://CRAN.R-project.org/package=KernelKnn/citation.html:
@Manual{, title= {{KernelKnn}: Kernel k Nearest Neighbors}, author= {Lampros Mouselimis}, year= {2025}, note= {R package version1.1.6}, url= {https://CRAN.R-project.org/package=KernelKnn},}