-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
metrics.R
34 lines (34 loc) · 1.3 KB
/
metrics.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# [description] List of metrics known to LightGBM. The most up to date list can be found
# at https://lightgbm.readthedocs.io/en/latest/Parameters.html#metric-parameters
#
# [return] A named logical vector, where each key is a metric name and each value is a boolean.
# TRUE if higher values of the metric are desirable, FALSE if lower values are desirable.
# Note that only the 'main' metrics are stored here, not aliases, since only the 'main' metrics
# are returned from the C++ side. For example, if you use `metric = "mse"` in your code,
# the metric name `"l2"` will be returned.
.METRICS_HIGHER_BETTER <- function() {
return(c(
"l1" = FALSE
, "l2" = FALSE
, "mape" = FALSE
, "rmse" = FALSE
, "quantile" = FALSE
, "huber" = FALSE
, "fair" = FALSE
, "poisson" = FALSE
, "gamma" = FALSE
, "gamma_deviance" = FALSE
, "tweedie" = FALSE
, "ndcg" = TRUE
, "map" = TRUE
, "auc" = TRUE
, "binary_logloss" = FALSE
, "binary_error" = FALSE
, "auc_mu" = TRUE
, "multi_logloss" = FALSE
, "multi_error" = FALSE
, "cross_entropy" = FALSE
, "cross_entropy_lambda" = FALSE
, "kullback_leibler" = FALSE
))
}