Rvalue: Generalized version of ovl_knn (Rvalue).

View source: R/knn.R

RvalueR Documentation

Generalized version of ovl_knn (Rvalue).

Description

Calculate distribution overlap by KNN (K-Nearest neighbor) This function is the original implementation of Rvalue. It works with more than 3 classes. The behavior of function is exactly the same as ovl_knn.

Usage

Rvalue(ds, cl, k = 5)

Arguments

ds

A numeric vector.

cl

An integer vector designating classes.

k

An integer. Number of k in KNN

Author(s)

Seongyong Park (2020-08-18)

References

This code is adopted from AmRMR. (paper) You can find their implementation in their websites. (Java, R) Many thanks to the professor Sejong Oh (Dankook University, sejongoh@dankook.ac.kr) who kindly share his work.

Examples

ds = c(rnorm(100, 0), rnorm(100, 1), rnorm(100,2))
cl = c(rep(0,100), rep(1,100), rep(2,100))
Rvalue(ds, cl, k=5)

psychemistz/ovltools documentation built on April 1, 2022, 2:26 a.m.