is_tuned {xnet} | R Documentation |
Getters for tskrrTune objects
Description
The functions described here are convenience functions to get
information out of a tskrrTune
object.
Usage
is_tuned(x)
get_grid(x)
get_loss_values(x)
has_onedim(x)
Arguments
x |
a |
Value
For is_tuned
: a logical value indicating whether the
model is tuned.
For get_grid
a list with the elements k
and
possibly g
, each containing the different lambdas tried in
the tuning for the row and column kernel matrices respectively.
For get_loss_values
a matrix with the calculated
loss values. Note that each row represents the result for one
lambda value related to the row kernel matrix K. For heterogeneous
models, every column represents the result for one lambda related
to the column kernel matrix G.
for is_onedim
a single logical value telling whether the
grid search in the object was onedimensional.
Examples
data(drugtarget)
mod <- tskrr(drugTargetInteraction, targetSim, drugSim)
tuned <- tune(mod, ngrid = 10)
is_tuned(mod)
is_tuned(tuned)
# Basic visualization of the grid.
gridvals <- get_grid(tuned)
z <- get_loss_values(tuned)
## Not run:
image(gridvals$k,gridvals$g,log(z), log = 'xy',
xlab = "lambda k", ylab = "lambda g")
## End(Not run)