Description Usage Arguments Details Value Warning Examples
This function does a permutation-based evaluation of the impact of different edges on the final result. It does so by permuting the kernel matrices, refitting the model and calculating a loss function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | permtest(x, ...)
## S3 method for class 'permtest'
print(x, digits = max(3L, getOption("digits") - 3), ...)
## S4 method for signature 'tskrrHeterogeneous'
permtest(
x,
n = 100,
permutation = c("both", "row", "column"),
exclusion = c("interaction", "row", "column", "both"),
replaceby0 = FALSE,
fun = loss_mse,
exact = FALSE
)
## S4 method for signature 'tskrrHomogeneous'
permtest(
x,
n = 100,
permutation = c("both"),
exclusion = c("interaction", "both"),
replaceby0 = FALSE,
fun = loss_mse,
exact = FALSE
)
## S4 method for signature 'tskrrTune'
permtest(x, permutation = c("both", "row", "column"), n = 100)
|
x |
either a |
... |
arguments passed to other methods |
digits |
the number of digits shown in the output |
n |
the number of permutations for every kernel matrix |
permutation |
a character string that defines whether the row, column or both kernel matrices should be permuted. Ignored in case of a homogeneous network |
exclusion |
the exclusion to be used in the |
replaceby0 |
a logical value indicating whether |
fun |
a function (or a character string with the name of a
function) that calculates the loss. See also |
exact |
a logical value that indicates whether or not an exact p-value should be calculated, or be approximated based on a normal distribution. |
The test involved uses a normal approximation. It assumes that under the null hypothesis, the loss values are approximately normally distributed. The cumulative probability of a loss as small or smaller than the one found in the original model, is calculated based on a normal distribution from which the mean and sd are calculated from the permutations.
An object of the class permtest.
It should be noted that this normal approximation is an ad-hoc approach. There's no guarantee that the actual distribution of the loss under the null hypothesis is normal. Depending on the loss function, a significant deviation from the theoretic distribution can exist. Hence this functions should only be used as a rough guidance in model evaluation.
1 2 3 4 5 6 | # Heterogeneous network
data(drugtarget)
mod <- tskrr(drugTargetInteraction, targetSim, drugSim)
permtest(mod, fun = loss_auc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.