Description Usage Arguments Value Examples
This function allows to get the metric values from a LightGBM log.
1 | lgbm.metric(model, metrics = TRUE, data.table = TRUE)
|
model |
Type: list, vector of characters, character. If a list, it should come from a trained model. If a vector of characters, it must be the model text. If a character, it must be the exact file path to the log file. It cannot work without training with |
metrics |
Type: boolean. Whether to return the metrics table ( |
data.table |
Type: boolean. Whether to return a data.table ( |
A data.table (or data.frame) with 3 to N columns, with at least: c("Iteration", "Total_Time", "Round_Time")
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# Get the metrics of the model trained (requires verbose = FALSE during training)
lgbm.metric(workingdir = trained[["Path"]],
log_name = trained[["Log"]],
metrics = TRUE,
data.table = TRUE)
# Get the best iteration of the model trained (requires verbose = FALSE during training)
lgbm.metric(workingdir = trained[["Path"]],
log_name = trained[["Log"]],
metrics = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.