try_current_hyper_params: Try current set of hyperparameters

Description Usage Arguments Examples

Description

Try current set of hyperparameters

Usage

1

Arguments

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function () 
{
  m <- build_krr_model(Km, y, gamma, set_b_0)
      if (is.null(m)) return()
	  y_pred <- Km 
      regr <- regr_param(y_pred, y)
      RMSE <- regr$RMSE
      R2 <- regr$R2
      cv <- cv_krr(10, Km, y, gamma)
      RMSEcv <- cv$RMSE
      Q2 <- cv$R2
      y_pred_cv <- cv$y_pred_cv
      minQ2R2 <- min(Q2, R2)
      if (minQ2R2 > minQ2R2_best) {
        minQ2R2_best <<- minQ2R2
        RMSE_best <<- RMSE
        R2_best <<- R2
        RMSEcv_best <<- RMSEcv
        Q2_best <<- Q2
		if (alpha_grid_search) {
          ialpha_best <<- ialpha
		}
		alpha_best <<- alpha
        gamma_best <<- gamma
        a_best <<- m$a
        b_best <<- m$b
        y_pred_best <<- y_pred
        y_pred_cv_best <<- y_pred_cv
	  }
}

conmolfields documentation built on May 2, 2019, 4:18 p.m.