# 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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.