Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/20686#discussion_r173594378
--- Diff:
mllib/src/test/scala/org/apache/spark/ml/feature/StringIndexerSuite.scala ---
@@ -328,7 +338,12 @@ class StringIndexerSuite
.setOutputCol("CITYIndexed")
.fit(dfNoBristol)
- val dfWithIndex = model.transform(dfNoBristol)
- assert(dfWithIndex.filter($"CITYIndexed" === 1.0).count == 1)
+ testTransformerByGlobalCheckFunc[(String, String, String)](
+ dfNoBristol,
+ model,
+ "CITYIndexed") { rows =>
+ val transformed = rows.map { r => r.getDouble(0)
}.toDF("CITYIndexed")
--- End diff --
It's probably easier to avoid going through a DataFrame here.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]