Skip to content

Commit a931b25

Browse files
committed
minor cleanups
1 parent 97d5697 commit a931b25

File tree

1 file changed

+4
-3
lines changed
  • mllib/src/main/scala/org/apache/spark/ml/clustering

1 file changed

+4
-3
lines changed

mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -619,10 +619,11 @@ object LocalLDAModel extends MLReadable[LocalLDAModel] {
619619
val dataPath = new Path(path, "data").toString
620620
val data = sparkSession.read.parquet(dataPath)
621621
val vectorConverted = MLUtils.convertVectorColumnsToML(data, "docConcentration")
622+
val matrixConverted = MLUtils.convertMatrixColumnsToML(vectorConverted, "topicsMatrix")
622623
val Row(vocabSize: Int, topicsMatrix: Matrix, docConcentration: Vector,
623-
topicConcentration: Double, gammaShape: Double) = MLUtils.convertMatrixColumnsToML(
624-
vectorConverted, "topicsMatrix").select("vocabSize", "topicsMatrix", "docConcentration",
625-
"topicConcentration", "gammaShape").head()
624+
topicConcentration: Double, gammaShape: Double) =
625+
matrixConverted.select("vocabSize", "topicsMatrix", "docConcentration",
626+
"topicConcentration", "gammaShape").head()
626627
val oldModel = new OldLocalLDAModel(topicsMatrix, docConcentration, topicConcentration,
627628
gammaShape)
628629
val model = new LocalLDAModel(metadata.uid, vocabSize, oldModel, sparkSession)

0 commit comments

Comments
 (0)