Learn R Programming

Laurae (version 0.0.0.9001)

xgboard.init: Xgboard Metric Evaluation Initialization (Environment)

Description

This function initializes the environment for the dump (logging). This must be run before any xgboost run.

Usage

xgboard.init(what, watchnames, maximizer, log)

Arguments

what
Type: character. A character or a vector of characters corresponding to the names of the metrics to log (in the right order, if there are multiples). It must be the same length of eval_metric passed to param on xgb.train. Do not use more than 3 metrics, as Xgboard is designed for a maximum of 3 metrics.
watchnames
Type: character. A character or a vector of characters corresponding to the names of the watchlist which are evaluated against the metric to log (in the right order, if there are multiples). It must be the same length of watchlist passed to xgb.train.
maximizer
Type: logical. A logical or a vector of logicals corresponding to whether to maximize (TRUE) or minimize (FALSE) the evaluation metrics (what). It must be the same length of what.
log
Type: character. Where to store the dump/log file? It must be an absolute path.

Value

An environment for the dumping. Does not store the dump though.

Examples

Run this code
## Not run: ------------------------------------
# # We prepare environment for Accuracy/Threshold logging on Train/Test
# # Stored in D:/debug/log.txt
# my_envir <- xgboard.init(what = c("Accuracy", "Threshold"),
#                          watchnames = c("Train", "Test"),
#                          maximizer = c(TRUE, TRUE),
#                          log = "D:/debug/log.txt")
## ---------------------------------------------

Run the code above in your browser using DataLab