From 5497242c769b40338bfa57d64f2c64996dfa57e8 Mon Sep 17 00:00:00 2001 From: Yuhao Yang Date: Wed, 6 Jul 2016 01:30:47 -0700 Subject: [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 Author: Yuhao Yang Closes #13941 from hhbyyh/ldapublic. --- mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mllib') 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 b333d59258..778cd0fee7 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) } -- cgit v1.2.3