getters-tskrrTune: Getters for tskrrTune objects

Description Usage Arguments Value Examples

Description

The functions described here are convenience functions to get information out of a tskrrTune object.

Usage

1
2
3
4
5
6
7

Arguments

x

a tskrrTune object or an object inheriting from tskrrTune.

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

 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)

xnet documentation built on Feb. 4, 2020, 9:10 a.m.