Repository: spark Updated Branches: refs/heads/branch-2.0 521fc7186 -> 25006c8bc
[SPARK-16249][ML] Change visibility of Object ml.clustering.LDA to public for loading ## What changes were proposed in this pull request? jira: https://issues.apache.org/jira/browse/SPARK-16249 Change visibility of Object ml.clustering.LDA to public for loading, thus users can invoke LDA.load("path"). ## How was this patch tested? existing ut and manually test for load ( saved with current code) Author: Yuhao Yang <[email protected]> Author: Yuhao Yang <[email protected]> Closes #13941 from hhbyyh/ldapublic. (cherry picked from commit 5497242c769b40338bfa57d64f2c64996dfa57e8) Signed-off-by: Yanbo Liang <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/25006c8b Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/25006c8b Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/25006c8b Branch: refs/heads/branch-2.0 Commit: 25006c8bcc397c9f070cc5d685ffeb5b8fb0a341 Parents: 521fc71 Author: Yuhao Yang <[email protected]> Authored: Wed Jul 6 01:30:47 2016 -0700 Committer: Yanbo Liang <[email protected]> Committed: Wed Jul 6 01:31:07 2016 -0700 ---------------------------------------------------------------------- .../main/scala/org/apache/spark/ml/clustering/LDA.scala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/25006c8b/mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala ---------------------------------------------------------------------- diff --git a/mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala b/mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala index b333d59..778cd0f 100644 --- a/mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala +++ b/mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala @@ -880,11 +880,13 @@ class LDA @Since("1.6.0") ( } } - -private[clustering] object LDA extends DefaultParamsReadable[LDA] { +@Since("2.0.0") +object LDA extends DefaultParamsReadable[LDA] { /** Get dataset for spark.mllib LDA */ - def getOldDataset(dataset: Dataset[_], featuresCol: String): RDD[(Long, OldVector)] = { + private[clustering] def getOldDataset( + dataset: Dataset[_], + featuresCol: String): RDD[(Long, OldVector)] = { dataset .withColumn("docId", monotonicallyIncreasingId()) .select("docId", featuresCol) @@ -894,6 +896,6 @@ private[clustering] object LDA extends DefaultParamsReadable[LDA] { } } - @Since("1.6.0") + @Since("2.0.0") override def load(path: String): LDA = super.load(path) } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
