[ https://issues.apache.org/jira/browse/SPARK-16697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15391067#comment-15391067 ]
Apache Spark commented on SPARK-16697: -------------------------------------- User 'WeichenXu123' has created a pull request for this issue: https://github.com/apache/spark/pull/14335 > redundant RDD computation in LDAOptimizer > ----------------------------------------- > > Key: SPARK-16697 > URL: https://issues.apache.org/jira/browse/SPARK-16697 > Project: Spark > Issue Type: Improvement > Components: ML, MLlib > Affects Versions: 2.0.1, 2.1.0 > Reporter: Weichen Xu > Original Estimate: 24h > Remaining Estimate: 24h > > In mllib.clustering.LDAOptimizer > the submitMiniBatch method, > the stats: RDD do not persist but the following code will use it twice. > so it cause redundant computation on it. > and there is another problem, > the expElogbetaBc broadcast variable is unpersist too early, > and the next statement > ` > val gammat: BDM[Double] = breeze.linalg.DenseMatrix.vertcat(val gammat: > BDM[Double] = breeze.linalg.DenseMatrix.vertcat( > stats.map(_._2).flatMap(list => list).collect().map(_.toDenseMatrix): > _*) > ` > will re-compute the stats RDD, it will use expElogbetaBc broadcast variable > again, > so the expElogbetaBc broadcast variable will be broadcast again. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org