Description Usage Arguments Value Examples
The functions described here are convenience functions to get
information out of a tskrrTune
object.
1 2 3 4 5 6 7 | is_tuned(x)
get_grid(x)
get_loss_values(x)
has_onedim(x)
|
x |
a |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.