Set ndcg to default for LTR. (#8822)
- Add document. - Add tests. - Use `ndcg` with `topk` as default.
This commit is contained in:
@@ -483,9 +483,13 @@ class QuantileError : public MetricNoCache {
|
||||
|
||||
const char* Name() const override { return "quantile"; }
|
||||
void LoadConfig(Json const& in) override {
|
||||
auto const& name = get<String const>(in["name"]);
|
||||
CHECK_EQ(name, "quantile");
|
||||
FromJson(in["quantile_loss_param"], ¶m_);
|
||||
auto const& obj = get<Object const>(in);
|
||||
auto it = obj.find("quantile_loss_param");
|
||||
if (it != obj.cend()) {
|
||||
FromJson(it->second, ¶m_);
|
||||
auto const& name = get<String const>(in["name"]);
|
||||
CHECK_EQ(name, "quantile");
|
||||
}
|
||||
}
|
||||
void SaveConfig(Json* p_out) const override {
|
||||
auto& out = *p_out;
|
||||
|
||||
Reference in New Issue
Block a user