try_current_hyper_params {conmolfields} | R Documentation |
Try current set of hyperparameters
Description
Try current set of hyperparameters
Usage
try_current_hyper_params()
Arguments
Examples
##---- 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
}
}
[Package
conmolfields version 0.0-19
Index]