[jvm-packages] Repair spark model eval (#2841)
In the refactor to add base margins, #2532, all of the labels were lost when creating the dmatrix. This became obvious as metrics like ndcg always returned 1.0 regardless of the results. Change-Id: I88be047e1c108afba4784bd3d892bfc9edeabe55
This commit is contained in:
committed by
Sergei Lebedev
parent
a8f670d247
commit
78d0bd6c9d
@@ -116,7 +116,7 @@ abstract class XGBoostModel(protected var _booster: Booster)
|
||||
null
|
||||
}
|
||||
}
|
||||
val dMatrix = new DMatrix(labeledPointsPartition.map(_.features.asXGB), cacheFileName)
|
||||
val dMatrix = new DMatrix(labeledPointsPartition.map(_.asXGB), cacheFileName)
|
||||
try {
|
||||
if (groupData != null) {
|
||||
dMatrix.setGroup(groupData(TaskContext.getPartitionId()).toArray)
|
||||
|
||||
Reference in New Issue
Block a user