[REFACTOR] Add alias, allow missing variables, init gbm interface
This commit is contained in:
@@ -30,7 +30,7 @@ class SoftmaxMultiClassObj : public ObjFunction {
|
||||
: output_prob_(output_prob) {
|
||||
}
|
||||
void Init(const std::vector<std::pair<std::string, std::string> >& args) override {
|
||||
param_.Init(args);
|
||||
param_.InitAllowUnknown(args);
|
||||
}
|
||||
void GetGradient(const std::vector<float>& preds,
|
||||
const MetaInfo& info,
|
||||
|
||||
@@ -33,7 +33,7 @@ struct LambdaRankParam : public dmlc::Parameter<LambdaRankParam> {
|
||||
class LambdaRankObj : public ObjFunction {
|
||||
public:
|
||||
void Init(const std::vector<std::pair<std::string, std::string> >& args) override {
|
||||
param_.Init(args);
|
||||
param_.InitAllowUnknown(args);
|
||||
}
|
||||
void GetGradient(const std::vector<float>& preds,
|
||||
const MetaInfo& info,
|
||||
|
||||
@@ -77,7 +77,7 @@ template<typename Loss>
|
||||
class RegLossObj : public ObjFunction {
|
||||
public:
|
||||
void Init(const std::vector<std::pair<std::string, std::string> >& args) override {
|
||||
param_.Init(args);
|
||||
param_.InitAllowUnknown(args);
|
||||
}
|
||||
void GetGradient(const std::vector<float> &preds,
|
||||
const MetaInfo &info,
|
||||
@@ -156,7 +156,7 @@ class PoissonRegression : public ObjFunction {
|
||||
public:
|
||||
// declare functions
|
||||
void Init(const std::vector<std::pair<std::string, std::string> >& args) override {
|
||||
param_.Init(args);
|
||||
param_.InitAllowUnknown(args);
|
||||
}
|
||||
|
||||
void GetGradient(const std::vector<float> &preds,
|
||||
|
||||
Reference in New Issue
Block a user