Fix tweedie handling of base_score (#3295)

* fix tweedie margin calculations

* add entry to contributors
This commit is contained in:
pdesahb
2018-06-28 17:43:05 +02:00
committed by Philip Hyunsu Cho
parent 64b8cffde3
commit 12e34f32e2
3 changed files with 9 additions and 3 deletions

View File

@@ -394,6 +394,11 @@ class TweedieRegression : public ObjFunction {
preds[j] = std::exp(preds[j]);
}
}
bst_float ProbToMargin(bst_float base_score) const override {
return std::log(base_score);
}
const char* DefaultEvalMetric() const override {
std::ostringstream os;
os << "tweedie-nloglik@" << param_.tweedie_variance_power;