[jvm-packages] remove APIs with DMatrix from xgboost-spark (#1519)
* test consistency of prediction functions between DMatrix and RDD * remove APIs with DMatrix from xgboost-spark * fix compilation error in xgboost4j-example * fix test cases
This commit is contained in:
@@ -122,15 +122,6 @@ class XGBoostModel(_booster: Booster) extends Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Predict result with the given test set (represented as DMatrix)
|
||||
*
|
||||
* @param testSet test set represented as DMatrix
|
||||
*/
|
||||
def predict(testSet: DMatrix): Array[Array[Float]] = {
|
||||
_booster.predict(testSet)
|
||||
}
|
||||
|
||||
/**
|
||||
* Predict leaf instances with the given test set (represented as RDD)
|
||||
*
|
||||
@@ -149,15 +140,6 @@ class XGBoostModel(_booster: Booster) extends Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Predict leaf instances with the given test set (represented as DMatrix)
|
||||
*
|
||||
* @param testSet test set represented as DMatrix
|
||||
*/
|
||||
def predictLeaves(testSet: DMatrix): Array[Array[Float]] = {
|
||||
_booster.predictLeaf(testSet, 0)
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the model as to HDFS-compatible file system.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user