Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15413#discussion_r94086048
  
    --- Diff: 
mllib/src/test/scala/org/apache/spark/ml/clustering/GaussianMixtureSuite.scala 
---
    @@ -18,22 +18,37 @@
     package org.apache.spark.ml.clustering
     
     import org.apache.spark.SparkFunSuite
    +import org.apache.spark.ml.linalg.{Matrices, Vector, Vectors}
     import org.apache.spark.ml.param.ParamMap
     import org.apache.spark.ml.util.{DefaultReadWriteTest, MLTestingUtils}
    +import org.apache.spark.ml.util.TestingUtils._
     import org.apache.spark.mllib.util.MLlibTestSparkContext
     import org.apache.spark.sql.Dataset
     
     
     class GaussianMixtureSuite extends SparkFunSuite with MLlibTestSparkContext
       with DefaultReadWriteTest {
     
    +  import testImplicits._
    +  import GaussianMixtureSuite._
    +
       final val k = 5
       @transient var dataset: Dataset[_] = _
    +  @transient var denseDataset: Dataset[_] = _
    +  @transient var sparseDataset: Dataset[_] = _
    +  @transient var decompositionDataset: Dataset[_] = _
    +  @transient var rDataset: Dataset[_] = _
     
       override def beforeAll(): Unit = {
         super.beforeAll()
     
         dataset = KMeansSuite.generateKMeansData(spark, 50, 3, k)
    +    denseDataset = denseData.map(FeatureData).toDF()
    +    sparseDataset = denseData.map { point =>
    +      FeatureData(Vectors.sparse(1, Array(0), point.toArray))
    --- End diff --
    
    Simplify: ```point.toSparse```


---
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]

Reply via email to