tskrr.fit {xnet} | R Documentation |
Carry out a two-step kernel ridge regression
Description
This function provides an interface for two-step kernel ridge regression.
To use this function, you need at least one kernel matrix and one
label matrix. It's the internal engine used by the function
tskrr
.
Usage
tskrr.fit(y, k, g = NULL, lambda.k = NULL, lambda.g = NULL, ...)
Arguments
y |
a matrix representing the links between the nodes of both networks. |
k |
an object of class |
g |
an optional object of class |
lambda.k |
a numeric value for the lambda parameter tied to the first kernel. |
lambda.g |
a numeric value for the lambda parameter tied
to the second kernel. If |
... |
arguments passed to other functions. Currently ignored. |
Details
This function is mostly available for internal use. In most cases, it
makes much more sense to use tskrr
, as that function
returns an object one can work with. The function
tskrr.fit
could be useful when doing simulations or
fitting algorithms, as the information returned from this function
is enough to use the functions returned by get_loo_fun
.
Value
a list with three elements:
k : the hat matrix for the rows
g : the hat matrix for the columns (or
NULL
) for homogeneous networks.pred : the predictions
Examples
data(drugtarget)
K <- eigen(targetSim)
G <- eigen(drugSim)
res <- tskrr.fit(drugTargetInteraction,K,G,
lambda.k = 0.01, lambda.g = 0.05)