Skip to content

wuwill/BKNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BKNN

Lifecycle: experimental

The goal of BKNN is to implement the Bayesian k-Nearest Neighbors algorithm in R.

Installation

You can install the development version of BKNN like so:

devtools::install_github("wuwill/BKNN")

Example

library(BKNN)
dat <- cbind(matrix(rnorm(30, 0), ncol = 5),
        matrix(rnorm(30, 2), ncol = 5))
sample_info <- data.frame(Name = paste0("I", 1:10), gender = rep(c("MALE", "FEMALE"), each = 5))
bnn_res <- calc_bnn(dat, sample_info, query = sample_info$Name, target = sample_info$Name, sample_col = "Name", status_col = "gender", class1 = "MALE")

Reference

Nuti G. An efficient algorithm for Bayesian nearest neighbours. Methodology and Computing in Applied Probability. 2019 Dec;21(4):1251-8.

About

What the Package Does (One Line, Title Case)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages