Repository: spark
Updated Branches:
  refs/heads/master 5f342049c -> 5497242c7


[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.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/5497242c
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5497242c
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5497242c

Branch: refs/heads/master
Commit: 5497242c769b40338bfa57d64f2c64996dfa57e8
Parents: 5f34204
Author: Yuhao Yang <[email protected]>
Authored: Wed Jul 6 01:30:47 2016 -0700
Committer: Yanbo Liang <[email protected]>
Committed: Wed Jul 6 01:30:47 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/5497242c/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]

Reply via email to