[jvm-packages][refactor] refactor XGBoost.scala (spark) (#3904)

* add back train method but mark as deprecated

* add back train method but mark as deprecated

* add back train method but mark as deprecated

* add back train method but mark as deprecated

* fix scalastyle error

* fix scalastyle error

* fix scalastyle error

* fix scalastyle error

* wrap iterators

* remove unused code

* refactor

* fix typo
This commit is contained in:
Nan Zhu
2018-11-15 20:38:28 -08:00
committed by GitHub
parent 0cd326c1bc
commit aa48b7e903
4 changed files with 76 additions and 50 deletions

View File

@@ -78,10 +78,10 @@ class XGBoostGeneralSuite extends FunSuite with PerTest {
val (booster, metrics) = XGBoost.trainDistributed(
trainingRDD,
List("eta" -> "1", "max_depth" -> "6", "silent" -> "1",
"objective" -> "binary:logistic").toMap,
round = 5, nWorkers = numWorkers, eval = null, obj = null, useExternalMemory = false,
hasGroup = false, missing = Float.NaN)
"objective" -> "binary:logistic", "num_round" -> 5, "num_workers" -> numWorkers,
"custom_eval" -> null, "custom_obj" -> null, "use_external_memory" -> false,
"missing" -> Float.NaN).toMap,
hasGroup = false)
assert(booster != null)
}
@@ -270,9 +270,10 @@ class XGBoostGeneralSuite extends FunSuite with PerTest {
val (booster, metrics) = XGBoost.trainDistributed(
trainingRDD,
List("eta" -> "1", "max_depth" -> "6", "silent" -> "1",
"objective" -> "binary:logistic").toMap,
round = 5, nWorkers = numWorkers, eval = null, obj = null, useExternalMemory = false,
hasGroup = true, missing = Float.NaN)
"objective" -> "binary:logistic", "num_round" -> 5, "num_workers" -> numWorkers,
"custom_eval" -> null, "custom_obj" -> null, "use_external_memory" -> false,
"missing" -> Float.NaN).toMap,
hasGroup = true)
assert(booster != null)
}