This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import _root_.ml.dmlc.xgboost4j.scala.spark.XGBoost | |
import org.apache.spark.ml.feature.LabeledPoint | |
def encodeFeaturesToLabeledPoint(features: RDD[Feature], relevance: Option[RDD[Relevance]], workers: Int) | |
(implicit parallel: Int): (RDD[LabeledPoint], Seq[String], Seq[Seq[Int]]) = { | |
val missingValue = Double.NaN | |
val names = features | |
.map { _.name } |
NewerOlder