Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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] {
Copy link
Contributor

@yanboliang yanboliang Jun 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SInCE("2.0.0")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For discussion: Should we bump up the version at L899 to 2.0.0? @Since is used for public function and LDA.load become public since 2.0.0 actually. cc @mengxr @jkbradley @MLnick

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, seems we have generally had load be since the version that model loading was actually added for that model? e.g. I see that is the case for tree models etc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please, bump to 2.0.0


/** 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)
Expand All @@ -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)
}