Merge lossgude and depthwise strategies for CPU hist (#7007)

* fix java/scala test: max depth is also valid parameter for lossguide

Co-authored-by: Kirill Shvets <kirill.shvets@intel.com>
This commit is contained in:
ShvetsKS
2021-06-02 20:49:43 +03:00
committed by GitHub
parent ee4f51a631
commit 57c732655e
11 changed files with 415 additions and 484 deletions

View File

@@ -387,7 +387,7 @@ public class BoosterImplTest {
DMatrix testMat = new DMatrix("../../demo/data/agaricus.txt.test");
Map<String, Object> paramMap = new HashMap<String, Object>() {
{
put("max_depth", 0);
put("max_depth", 3);
put("silent", 1);
put("objective", "binary:logistic");
put("tree_method", "hist");
@@ -408,7 +408,7 @@ public class BoosterImplTest {
DMatrix testMat = new DMatrix("../../demo/data/agaricus.txt.test");
Map<String, Object> paramMap = new HashMap<String, Object>() {
{
put("max_depth", 0);
put("max_depth", 3);
put("silent", 1);
put("objective", "binary:logistic");
put("tree_method", "hist");

View File

@@ -159,7 +159,7 @@ class ScalaBoosterImplSuite extends FunSuite {
test("test with quantile histo lossguide") {
val trainMat = new DMatrix("../../demo/data/agaricus.txt.train")
val testMat = new DMatrix("../../demo/data/agaricus.txt.test")
val paramMap = List("max_depth" -> "0", "silent" -> "0",
val paramMap = List("max_depth" -> "3", "silent" -> "0",
"objective" -> "binary:logistic", "tree_method" -> "hist",
"grow_policy" -> "lossguide", "max_leaves" -> "8", "eval_metric" -> "auc").toMap
trainBoosterWithQuantileHisto(trainMat, Map("training" -> trainMat, "test" -> testMat),
@@ -169,7 +169,7 @@ class ScalaBoosterImplSuite extends FunSuite {
test("test with quantile histo lossguide with max bin") {
val trainMat = new DMatrix("../../demo/data/agaricus.txt.train")
val testMat = new DMatrix("../../demo/data/agaricus.txt.test")
val paramMap = List("max_depth" -> "0", "silent" -> "0",
val paramMap = List("max_depth" -> "3", "silent" -> "0",
"objective" -> "binary:logistic", "tree_method" -> "hist",
"grow_policy" -> "lossguide", "max_leaves" -> "8", "max_bin" -> "16",
"eval_metric" -> "auc").toMap