getters-tskrrImpute: Getters for tskrrImpute objects

Description Usage Arguments Value Examples

Description

The functions described here are convenience functions to get information out of a tskrrImpute object.

Usage

1
2
3
4
5

Arguments

x

a tskrrImpute object or an object inheriting from tskrrImpute.

Value

For has_imputed_values: a logical value indicating whether the model has imputed values. If x is not some form of a tskrr model, the function will return an error.

For which_imputed: a integer vector with the positions for which the values are imputed.

for is_imputed: a matrix of the same dimensions as the label matrix. It contains the value FALSE at positions that were not imputed, and TRUE at positions that were.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(drugtarget)

mod <- tskrr(drugTargetInteraction, targetSim, drugSim)

naid <- sample(length(drugTargetInteraction), 30)
drugTargetInteraction[naid] <- NA

impmod <- impute_tskrr(drugTargetInteraction, targetSim, drugSim)

has_imputed_values(mod)
has_imputed_values(impmod)

# For illustration: extract imputed values
id <- is_imputed(impmod)
fitted(impmod)[id]

xnet documentation built on Feb. 4, 2020, 9:10 a.m.