zhengruifeng removed a comment on pull request #27473:
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 |
With NativeBLAS with OPENBLAS_NUM_THREADS=1:
|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|20|3|20|8|
|logLikelihood|2814835.4700277243 | 2817523.6371536693 |
2820228.372200879|2814835.4700277452|2817523.6371535957|2820228.372200736|
|dur per iteration| 780.0| 2356.3333333333335 | 8192.95 | 1183.0 | 3022.1 |
13073.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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]