Github user allwefantasy commented on the pull request: https://github.com/apache/spark/pull/1983#issuecomment-55221324 @witgo 西é¢è¿ä¸æ®µä»£ç å¯ä»¥å¤çº¿ç¨åä¹ï¼ for (i <- 0 until content.length) { val term = content(i) val topic = topics(i) val chosenTopic = topicModel.dropOneDistSampler(topicsDist, topicThisTerm, rand, term, topic) if (topic != chosenTopic) { topics(i) = chosenTopic topicsDist(topic) += -1 topicsDist(chosenTopic) += 1 topicModel.update(term, topic, -1) topicModel.update(term, chosenTopic, 1) } } å°æ¤ä»£ç æ¹æ content.zipWithIndex.map(f=>f._2).toList.par.foreach{i=> val term = content(i) val topic = topics(i) val chosenTopic = topicModel.dropOneDistSampler(topicsDist, topicThisTerm, rand, term, topic) if (topic != chosenTopic) { topics(i) = chosenTopic topicsDist(topic) += -1 topicsDist(chosenTopic) += 1 topicModel.update(term, topic, -1) topicModel.update(term, chosenTopic, 1) } } æç®åçæ åµæ¯åæºCPUæ ¸å¤ï¼24æ ¸ãä½å åæéï¼æ以å¸æå¤çº¿ç¨è¯ä¸é¨å代ç ã
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org