[jvm-packages] Parameter tuning tool for XGBoost (#1664)

This commit is contained in:
Nan Zhu
2016-10-23 16:58:18 -04:00
committed by GitHub
parent ac41845d4b
commit 016ab89484
14 changed files with 776 additions and 147 deletions

View File

@@ -45,12 +45,11 @@ object XGBoost {
watches: Map[String, DMatrix] = Map[String, DMatrix](),
obj: ObjectiveTrait = null,
eval: EvalTrait = null): Booster = {
val jWatches = watches.map{case (name, matrix) => (name, matrix.jDMatrix)}
val xgboostInJava = JXGBoost.train(
dtrain.jDMatrix,
params.map{
// we have to filter null value for customized obj and eval
params.filter(_._2 != null).map{
case (key: String, value) => (key, value.toString)
}.toMap[String, AnyRef].asJava,
round, jWatches.asJava,