Description Usage Arguments Value Examples
The functions described here are convenience functions to get
information out of a tskrrImpute
object.
1 2 3 4 5 | has_imputed_values(x)
which_imputed(x)
is_imputed(x)
|
x |
a |
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.
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]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.