KNC {msImpute} | R Documentation

## k-nearest class means (KNC)

### 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

    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

    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))

[Package msImpute version 1.0.0 Index]