Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/16784#discussion_r103582543
--- Diff:
mllib/src/test/scala/org/apache/spark/ml/classification/LinearSVCSuite.scala ---
@@ -51,6 +54,12 @@ class LinearSVCSuite extends SparkFunSuite with
MLlibTestSparkContext with Defau
smallBinaryDataset = generateSVMInput(A, Array[Double](B, C), nPoints,
42).toDF()
smallValidationDataset = generateSVMInput(A, Array[Double](B, C),
nPoints, 17).toDF()
binaryDataset = generateSVMInput(1.0, Array[Double](1.0, 2.0, 3.0,
4.0), 10000, 42).toDF()
+
+ // Dataset for testing SparseVector
+ smallSparseBinaryDataset = generateSVMInput(A, Array[Double](B, C),
nPoints, 42, false).toDF()
--- End diff --
Why call generateSVMInput again? It seems brittle. I'd prefer to use a
UDF to convert the vectors to sparse vectors here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]