tskrr.fit: 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.
a matrix representing the links between the nodes of both
networks.
k
an object of class eigen containing the eigen
decomposition of the first kernel matrix.
g
an optional object of class eigen containing
the eigen decomposition of the second kernel matrix. If NULL,
the network is considered to be homogeneous.
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 NULL, the model is fit using the same
value for lambda.k and lambda.g
...
arguments passed to other functions. Currently ignored.
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
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.
# NOT RUN {data(drugtarget)
K <- eigen(targetSim)
G <- eigen(drugSim)
res <- tskrr.fit(drugTargetInteraction,K,G,
lambda.k = 0.01, lambda.g = 0.05)
# }