zhengruifeng commented on issue #27473: [SPARK-30699][ML][PYSPARK] GMM blockify input vectors URL: https://github.com/apache/spark/pull/27473#issuecomment-582765435 data: `a9a`: numFeatures=123, numInstances=32,561 testCode: ```scala import org.apache.spark.ml.clustering._ import org.apache.spark.storage.StorageLevel import org.apache.spark.ml.linalg._ val df = spark.read.format("libsvm").load("/data1/Datasets/a9a/a9a") df.persist(StorageLevel.MEMORY_AND_DISK) df.count new GaussianMixture().fit(df) val results = Seq(2, 8, 32).map { k => val start = System.currentTimeMillis; val model = new GaussianMixture().setK(k).setSeed(0).setTol(0).setMaxIter(20).fit(df); val dur = System.currentTimeMillis - start; (model, dur) } results.map(_._2) results.map(_._1.summary.numIter) results.map(_._1.summary.logLikelihood) results.map(t => t._2.toDouble / t._1.summary.numIter) ``` result: |Impl| This PR(k=2) | This PR(k=8) | This PR(k=32) | Master(k=2) | Master(k=8) | Master(k=32) | |------|----------|------------|----------|------------|----------|----------| |numIter|3|3|5|3|8|4| |logLikelihood|2814835.470027733|2817523.6371536762|2820228.372200876|2814835.4700277536|2817523.6371535994|2820228.3722007386| |dur per iteration| 950.0 | 2744.3333333333335 | 9780.6 | 1192.6666666666667 | 3446.375| 15724.75 |
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
