Rename misspelled config parameter for pseudo-Huber (#7904)
This commit is contained in:
parent
1baad8650c
commit
4cd14aee5a
@ -207,7 +207,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"pseduo_huber_param": {
|
||||
"pseudo_huber_param": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"huber_slope": {
|
||||
|
||||
@ -171,11 +171,11 @@ class PseudoErrorLoss : public Metric {
|
||||
public:
|
||||
const char* Name() const override { return "mphe"; }
|
||||
void Configure(Args const& args) override { param_.UpdateAllowUnknown(args); }
|
||||
void LoadConfig(Json const& in) override { FromJson(in["pseduo_huber_param"], ¶m_); }
|
||||
void LoadConfig(Json const& in) override { FromJson(in["pseudo_huber_param"], ¶m_); }
|
||||
void SaveConfig(Json* p_out) const override {
|
||||
auto& out = *p_out;
|
||||
out["name"] = String(this->Name());
|
||||
out["pseduo_huber_param"] = ToJson(param_);
|
||||
out["pseudo_huber_param"] = ToJson(param_);
|
||||
}
|
||||
|
||||
double Eval(const HostDeviceVector<bst_float>& preds, const MetaInfo& info,
|
||||
|
||||
@ -255,16 +255,16 @@ class PseudoHuberRegression : public ObjFunction {
|
||||
void SaveConfig(Json* p_out) const override {
|
||||
auto& out = *p_out;
|
||||
out["name"] = String("reg:pseudohubererror");
|
||||
out["pseduo_huber_param"] = ToJson(param_);
|
||||
out["pseudo_huber_param"] = ToJson(param_);
|
||||
}
|
||||
|
||||
void LoadConfig(Json const& in) override {
|
||||
auto const& config = get<Object const>(in);
|
||||
if (config.find("pseduo_huber_param") == config.cend()) {
|
||||
if (config.find("pseudo_huber_param") == config.cend()) {
|
||||
// The parameter is added in 1.6.
|
||||
return;
|
||||
}
|
||||
FromJson(in["pseduo_huber_param"], ¶m_);
|
||||
FromJson(in["pseudo_huber_param"], ¶m_);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user