Xgboost objective


#1

the doc https://xgboost.readthedocs.io/en/latest/parameter.html says the default xgboost objective function is “reg:squarederror”, but when i use this setting, i get error and info as bellows:

[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: binary:hinge
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: multi:softmax
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: multi:softprob
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: rank:pairwise
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: rank:ndcg
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: rank:map
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: reg:linear
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: reg:logistic
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: binary:logistic
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: binary:logitraw
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: gpu:reg:linear
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: gpu:reg:logistic
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: gpu:binary:logistic
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: gpu:binary:logitraw
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: count:poisson
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: survival:cox
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: reg:gamma
[14:41:54] INFO: /xgboost/src/objective/objective.cc:21: Objective candidate: reg:tweedie
Exception in thread “main” ml.dmlc.xgboost4j.java.XGBoostError: [14:41:54] /xgboost/src/objective/objective.cc:23: Unknown objective function reg:squarederror


#2

If you are using version 0.82 or below, use reg:linear.

reg:squarederror is in the 0.83 dev release.