[jvm-packages] Disable fast histo for spark (#2296)

* add back train method but mark as deprecated

* fix scalastyle error

* disable fast histogram in xgboost4j-spark temporarily
This commit is contained in:
Nan Zhu
2017-05-15 20:43:16 -07:00
committed by GitHub
parent c66ca79221
commit a607f697e3
3 changed files with 13 additions and 6 deletions

View File

@@ -266,6 +266,10 @@ object XGBoost extends Serializable {
trainingData: RDD[MLLabeledPoint], params: Map[String, Any], round: Int,
nWorkers: Int, obj: ObjectiveTrait = null, eval: EvalTrait = null,
useExternalMemory: Boolean = false, missing: Float = Float.NaN): XGBoostModel = {
if (params.contains("tree_method")) {
require(params("tree_method") != "hist", "xgboost4j-spark does not support fast histogram" +
" for now")
}
require(nWorkers > 0, "you must specify more than 0 workers")
if (obj != null) {
require(params.get("obj_type").isDefined, "parameter \"obj_type\" is not defined," +