Github user WeichenXu123 commented on a diff in the pull request:
https://github.com/apache/spark/pull/20121#discussion_r171796773
--- Diff:
mllib/src/test/scala/org/apache/spark/ml/classification/MultilayerPerceptronClassifierSuite.scala
---
@@ -75,11 +71,9 @@ class MultilayerPerceptronClassifierSuite
.setMaxIter(100)
.setSolver("l-bfgs")
val model = trainer.fit(dataset)
- val result = model.transform(dataset)
MLTestingUtils.checkCopyAndUids(trainer, model)
- val predictionAndLabels = result.select("prediction",
"label").collect()
- predictionAndLabels.foreach { case Row(p: Double, l: Double) =>
- assert(p == l)
+ testTransformer[(Vector, Double)](dataset.toDF(), model, "prediction",
"label") {
--- End diff --
The type of `dataset` is `Dataset[_]` ?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]