[APPROX] Make global proposal default, add group ptr solution
This commit is contained in:
parent
ce4d59ed69
commit
63c4ad7617
@ -31,4 +31,4 @@ LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server
|
||||
#
|
||||
XGB_PLUGINS += plugin/example/plugin.mk
|
||||
XGB_PLUGINS += plugin/lz4/plugin.mk
|
||||
XGB_PLUGINS += plugin/dense_libsvm/plugin.mk
|
||||
XGB_PLUGINS += plugin/dense_parser/plugin.mk
|
||||
|
||||
@ -124,6 +124,14 @@ void MetaInfo::SetInfo(const char* key, const void* dptr, DataType dtype, size_t
|
||||
base_margin.resize(num);
|
||||
DISPATCH_CONST_PTR(dtype, dptr, cast_dptr,
|
||||
std::copy(cast_dptr, cast_dptr + num, base_margin.begin()));
|
||||
} else if (!std::strcmp(key, "group")) {
|
||||
group_ptr.resize(num + 1);
|
||||
DISPATCH_CONST_PTR(dtype, dptr, cast_dptr,
|
||||
std::copy(cast_dptr, cast_dptr + num, group_ptr.begin() + 1));
|
||||
group_ptr[0] = 0;
|
||||
for (size_t i = 1; i < group_ptr.size(); ++i) {
|
||||
group_ptr[i] = group_ptr[i - 1] + group_ptr[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -87,7 +87,7 @@ struct TrainParam : public dmlc::Parameter<TrainParam> {
|
||||
.describe("Subsample ratio of columns, resample on each tree construction.");
|
||||
DMLC_DECLARE_FIELD(opt_dense_col).set_range(0.0f, 1.0f).set_default(1.0f)
|
||||
.describe("EXP Param: speed optimization for dense column.");
|
||||
DMLC_DECLARE_FIELD(sketch_eps).set_range(0.0f, 1.0f).set_default(0.1f)
|
||||
DMLC_DECLARE_FIELD(sketch_eps).set_range(0.0f, 1.0f).set_default(0.03f)
|
||||
.describe("EXP Param: Sketch accuracy of approximate algorithm.");
|
||||
DMLC_DECLARE_FIELD(sketch_ratio).set_lower_bound(0.0f).set_default(2.0f)
|
||||
.describe("EXP Param: Sketch accuracy related parameter of approximate algorithm.");
|
||||
|
||||
@ -871,7 +871,7 @@ class QuantileHistMaker: public HistMaker<TStats> {
|
||||
std::vector<common::WQuantileSketch<bst_float, bst_float> > sketchs;
|
||||
};
|
||||
|
||||
XGBOOST_REGISTER_TREE_UPDATER(HistMaker, "grow_histmaker")
|
||||
XGBOOST_REGISTER_TREE_UPDATER(LocalHistMaker, "grow_local_histmaker")
|
||||
.describe("Tree constructor that uses approximate histogram construction.")
|
||||
.set_body([]() {
|
||||
return new CQHistMaker<GradStats>();
|
||||
@ -879,6 +879,12 @@ XGBOOST_REGISTER_TREE_UPDATER(HistMaker, "grow_histmaker")
|
||||
|
||||
XGBOOST_REGISTER_TREE_UPDATER(GlobalHistMaker, "grow_global_histmaker")
|
||||
.describe("Tree constructor that uses approximate global proposal of histogram construction.")
|
||||
.set_body([]() {
|
||||
return new GlobalProposalHistMaker<GradStats>();
|
||||
});
|
||||
|
||||
XGBOOST_REGISTER_TREE_UPDATER(HistMaker, "grow_histmaker")
|
||||
.describe("Tree constructor that uses approximate global of histogram construction.")
|
||||
.set_body([]() {
|
||||
return new GlobalProposalHistMaker<GradStats>();
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user