KNC: k-nearest class means (KNC)

Description Usage Arguments Value Examples

View source: R/KNC.R

Description

The fraction of k-nearest class means in the original data that are preserved as k-nearest class means in imputed data. KNC quantifies preservation of the mesoscopic structure after imputation. Requires complete datasets - for developers/use in benchmark studies only.

Usage

1
KNC(xorigin, ximputed, class, k = 3)

Arguments

xorigin

numeric matrix. The original log-intensity data. Can contain missing values.

ximputed

numeric matrix. The imputed log-intensity data.

class

factor. A vector of length number of columns (samples) in the data specifying the class/label (i.e. experimental group) of each sample.

k

number of nearest class means. default to k=3.

Value

numeric The proportion of preserved k-nearest class means in imputed data.

Examples

1
2
3
4
5
data(pxd007959)
y <- pxd007959$y
y <- y[complete.cases(y),]
# for demonstration we use same y for xorigin and ximputed
KNC(y, y, class = as.factor(pxd007959$samples$group))

msImpute documentation built on Nov. 8, 2020, 5:26 p.m.