Description Usage Arguments Value See Also Examples
tskrr
is the primary function for fitting a two-step kernel
ridge regression model. It can be used for both homogeneous and heterogeneous
networks.
1 2 3 4 5 6 7 8 9 10 |
y |
a label matrix |
k |
a kernel matrix for the rows |
g |
an optional kernel matrix for the columns |
lambda |
a numeric vector with one or two values for the hyperparameter lambda. If two values are given, the first one is used for the k matrix and the second for the g matrix. |
testdim |
a logical value indicating whether symmetry
and the dimensions of the kernel(s) should be tested.
Defaults to |
testlabels |
a logical value indicating wether the row- and column
names of the matrices have to be checked for consistency. Defaults to
|
symmetry |
a character value with the possibilities "auto", "symmetric" or "skewed". In case of a homogeneous fit, you can either specify whether the label matrix is symmetric or skewed, or you can let the function decide (option "auto"). |
keep |
a logical value indicating whether the kernel hat
matrices should be stored in the model object. Doing so makes the
model object quite larger, but can speed up predictions in
some cases. Defaults to |
a tskrr
object
response
, fitted
,
get_eigen
, eigen2hat
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Heterogeneous network
data(drugtarget)
mod <- tskrr(drugTargetInteraction, targetSim, drugSim)
Y <- response(mod)
pred <- fitted(mod)
# Homogeneous network
data(proteinInteraction)
modh <- tskrr(proteinInteraction, Kmat_y2h_sc)
Yh <- response(modh)
pred <- fitted(modh)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.