Skip to content

Commit

Permalink
minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbradley committed Sep 9, 2016
1 parent 97d5697 commit a931b25
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala
Original file line number Diff line number Diff line change
Expand Up @@ -619,10 +619,11 @@ object LocalLDAModel extends MLReadable[LocalLDAModel] {
val dataPath = new Path(path, "data").toString
val data = sparkSession.read.parquet(dataPath)
val vectorConverted = MLUtils.convertVectorColumnsToML(data, "docConcentration")
val matrixConverted = MLUtils.convertMatrixColumnsToML(vectorConverted, "topicsMatrix")
val Row(vocabSize: Int, topicsMatrix: Matrix, docConcentration: Vector,
topicConcentration: Double, gammaShape: Double) = MLUtils.convertMatrixColumnsToML(
vectorConverted, "topicsMatrix").select("vocabSize", "topicsMatrix", "docConcentration",
"topicConcentration", "gammaShape").head()
topicConcentration: Double, gammaShape: Double) =
matrixConverted.select("vocabSize", "topicsMatrix", "docConcentration",
"topicConcentration", "gammaShape").head()
val oldModel = new OldLocalLDAModel(topicsMatrix, docConcentration, topicConcentration,
gammaShape)
val model = new LocalLDAModel(metadata.uid, vocabSize, oldModel, sparkSession)
Expand Down

0 comments on commit a931b25

Please sign in to comment.