Skip to content

Commit

Permalink
[R-package] add missing objectives
Browse files Browse the repository at this point in the history
  • Loading branch information
guolinke committed Mar 22, 2018
1 parent bcd7700 commit 19562a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R-package/R/utils.R
Expand Up @@ -160,7 +160,12 @@ lgb.check.params <- function(params) {
lgb.check.obj <- function(params, obj) {

# List known objectives in a vector
OBJECTIVES <- c("regression", "regression_l1", "regression_l2", "huber", "fair", "poisson", "binary", "lambdarank", "multiclass")
OBJECTIVES <- c("regression", "regression_l1", "regression_l2", "mean_squared_error", "mse", "l2_root", "root_mean_squared_error", "rmse",
"mean_absolute_error", "mae", "quantile",
"huber", "fair", "poisson", "binary", "lambdarank",
"multiclass", "softmax", "multiclassova", "multiclass_ova", "ova", "ovr",
"xentropy", "cross_entropy", "xentlambda", "cross_entropy_lambda", "mean_absolute_percentage_error", "mape",
"gamma", "tweedie")

# Check whether the objective is empty or not, and take it from params if needed
if (!is.null(obj)) { params$objective <- obj }
Expand Down

0 comments on commit 19562a9

Please sign in to comment.