xgboost/src/common/pseudo_huber.h
Jiaming Yuan 98d6faefd6
Implement slope for Pseduo-Huber. (#7727)
* Add objective and metric.
* Some refactoring for CPU/GPU dispatching using linalg module.
2022-03-14 21:42:38 +08:00

20 lines
518 B
C++

#ifndef XGBOOST_COMMON_PSEUDO_HUBER_H_
#define XGBOOST_COMMON_PSEUDO_HUBER_H_
/*!
* Copyright 2022, by XGBoost Contributors
*/
#include "xgboost/parameter.h"
namespace xgboost {
struct PesudoHuberParam : public XGBoostParameter<PesudoHuberParam> {
float huber_slope{1.0};
DMLC_DECLARE_PARAMETER(PesudoHuberParam) {
DMLC_DECLARE_FIELD(huber_slope)
.set_default(1.0f)
.describe("The delta term in Pseudo-Huber loss.");
}
};
} // namespace xgboost
#endif // XGBOOST_COMMON_PSEUDO_HUBER_H_