Weighted k-Nearest Neighbors

Weighted k-Nearest Neighbors for Classification, Regression and Clustering.


Build Status CRAN Status Badge License CRAN Downloads Research software impact

kknn is a R package for Weighted k-Nearest Neighbors Classification, Regression and Clustering.

You can install

  • the latest released version install.packages("kknn")
  • the latest development version devtools::install_github("KlausVigo/kknn")

If you use kknn please cite:

Hechenbichler K. and Schliep K.P. (2004) Weighted k-Nearest-Neighbor Techniques and Ordinal Classification, Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich

License

phangorn is licensed under the GPLv2.

News

        CHANGES IN KKNN VERSION 1.3.1

OTHER CHANGES

o predict got an additional argument "type"  

o changed igraph code to version >=1.0    

o train.kknn has a new argument ks, a vector specifying values of k



        CHANGES IN KKNN VERSION 1.3.0

OTHER CHANGES

o kknn is now hosted on github

o added travis-ci support 



        CHANGES IN KKNN VERSION 1.2-5

BUG FIXES

o a browser() sneaked into kknn 


        CHANGES IN KKNN VERSION 1.2-4

NEW FEATURES

o new function kknn.dist

OTHER CHANGES

o kknn returns now an index matrix of nearest neighbors



        CHANGES IN KKNN VERSION 1.2-3

BUG FIXES

o Namespace changed  



        CHANGES IN KKNN VERSION 1.2-2

NEW FEATURES

o kknn has new parameter scale to switch off scaling   

o new function cv.kknn for k-fold cross validation,

  replacing the function simulation in future  

o default kernel changed to optimal

BUG FIXES

o interaction terms in formulas should be handled correctly 

OTHER CHANGES

o speeded up kknn code a bit and reduced some memory allocations



        CHANGES IN KKNN VERSION 1.2-1

BUG FIXES

o solved some namespace problems  



        CHANGES IN KKNN VERSION 1.2-0

NEW FEATURES

o added new kernel "optimal" to kknn Samworth (2012).             
        


        CHANGES IN KKNN VERSION 1.1-2

BUG FIXES

o changed package to work with igraph >= 0.6  



        CHANGES IN KKNN VERSION 1.1-1

OTHER CHANGES

o computation of Eucledian distances is 3-5 times faster. 



        CHANGES IN KKNN VERSION 1.1-0

NEW FEATURES

o added spectral clustering function specClust. 

OTHER CHANGES

o computation of knn distances is much faster. 



        CHANGES IN KKNN VERSION 1.0-8

BUG FIXES

o the data.frame for the training data set does not have to contain the 
  response variable (suggested by Carlos J. Gil Bellosta).  



        CHANGES IN KKNN VERSION 1.0-5

BUG FIXES

o A bug was fixed, leave-one-out crossvalidation now works fine.



        CHANGES IN KKNN VERSION 1.0-3

NEW FEATURES

o new parameter ykernel: Window width of an y-kernel, 
  especially for prediction of ordinal classes.

BUG FIXES

o A bug was fixed in the kernel="rank" in kknn.

o kernel  = "gaussian" did not work correctly: this has been fixed.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("kknn")

1.3.1 by Klaus Schliep, 5 years ago


https://github.com/KlausVigo/kknn


Browse source code at https://github.com/cran/kknn


Authors: Klaus Schliep [aut, cre] , Klaus Hechenbichler [aut] , Antoine Lizee [ctb]


Documentation:   PDF Manual  


Task views: Multivariate Statistics


GPL (>= 2) license


Imports igraph, Matrix, stats, graphics


Imported by NoiseFiltersR, RSDA, predictoR, regressoR, rminer, swfscMisc, traineR.

Depended on by EnsembleBase, MM2S, mbclusterwise.

Suggested by MachineShop, SSLR, butcher, fscaret, mlr, mlr3learners, mlr3pipelines, mlr3tuningspaces, mlrMBO, parsnip, stacks, utiml, workflowsets.


See at CRAN