Unverified Commit f7b08b54 authored by Guolin Ke's avatar Guolin Ke Committed by GitHub
Browse files

[R Package] remove default metrics since we have this in cpp side.

parent 19562a90
......@@ -211,33 +211,7 @@ lgb.check.eval <- function(params, eval) {
}
}
# Check if evaluation metric is not a function
if (!is.function(eval)) {
# Check if there is no parameter
if (length(params$metric) == 0) {
# Add default metric
params$metric <- switch(
params$objective,
regression = "l2", # MSE
regression_l1 = "l1", # MAE
regression_l2 = "l2", # MSE
huber = "l1", # Proxy for MAE
fair = "l1", # Proxy for MAE
poisson = "poisson", # Poisson
binary = "binary_logloss", # Logloss
multiclass = "multi_logloss", # Multiclass logloss
lambdarank = "ndcg", # Normalized discounted cumulative gain
stop("lgb.check.eval: No default metric available for objective ", sQuote(params$objective)) # Unknown objective parameter
)
}
}
}
# Return parameters
return(params)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment