[jvm-packages] separate classification and regression model and integrate with ML package (#1608)
This commit is contained in:
@@ -38,6 +38,8 @@ trait EvalTrait extends IEvaluation {
|
||||
def eval(predicts: Array[Array[Float]], dmat: DMatrix): Float
|
||||
|
||||
private[scala] def eval(predicts: Array[Array[Float]], jdmat: java.DMatrix): Float = {
|
||||
require(predicts.length == jdmat.getLabel.length, "predicts size and label size must match " +
|
||||
s" predicts size: ${predicts.length}, label size: ${jdmat.getLabel.length}")
|
||||
eval(predicts, new DMatrix(jdmat))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user