Fix default metric configuration. (#9575)
This commit is contained in:
@@ -287,6 +287,13 @@ class PseudoHuberRegression : public FitIntercept {
|
||||
}
|
||||
FromJson(in["pseudo_huber_param"], ¶m_);
|
||||
}
|
||||
[[nodiscard]] Json DefaultMetricConfig() const override {
|
||||
CHECK(param_.GetInitialised());
|
||||
Json config{Object{}};
|
||||
config["name"] = String{this->DefaultEvalMetric()};
|
||||
config["pseudo_huber_param"] = ToJson(param_);
|
||||
return config;
|
||||
}
|
||||
};
|
||||
|
||||
XGBOOST_REGISTER_OBJECTIVE(PseudoHuberRegression, "reg:pseudohubererror")
|
||||
|
||||
Reference in New Issue
Block a user