Objective function for classification

I have reading the source code, specifically in the objective directory: xgboost/src/objective at master · dmlc/xgboost (github.com)

There are files and classes for regression, ranking, and multiclass classification tasks. For example the regression_obj.cu file has a RegLossObj class in it and the multiclass_obj.cu file has the SoftmaxMultiClassObj class in it (which inherits from ObjFunction). However, I cannot find a module or class structure for normal binary classification task. Would the SoftmaxMultiClassObj class just be reduced to binary classification with only two classes?

Thanks,

Karl Gardner

Hi, in XGBoost there are currently two objective functions specifically designed for binary classification: one is ‘logistic’, another is ‘hinge’. The ‘hinge’ objective is wrapped up in a class called HingeObj in file hinge.cu, while ‘logistic’ objective, which works for both (probability) regression or binary classification, is contained in the file regression_obj.cu. You can find more information for available objectives in section “Learning Task Parameters” of XGBoost Parameters