R/TuneOLS.R

# TuneOLS

TuneOLS <- function(xgb, metric){
    params <- c("eta", "max_depth", "gamma", "colsample_bytree", "min_child_weight", "subsample", "nrounds")
    tune_ols <- lm(data = xgb$results, xgb$results[,metric] ~ eta + max_depth + gamma + colsample_bytree + min_child_weight + subsample + nrounds)
    return(tune_ols)
    
}
tohweizhong/Quicktune documentation built on May 31, 2019, 4:48 p.m.