Skip to content

Commit ffb88bb

Browse files
committed
Update Word2Vec.scala
Added javadoc
1 parent 5eb9100 commit ffb88bb

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

mllib/src/main/scala/org/apache/spark/mllib/feature/Word2Vec.scala

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,17 @@ class Word2Vec extends Serializable with Logging {
121121

122122
/** context words from [-window, window] */
123123
private val window = 5
124-
125-
/** minimum frequency to consider a vocabulary word */
126-
private var minCount = 5
127-
128-
def setMinCount(minCount: Int): this.type = {
129-
this.minCount = minCount
130-
this
131-
}
124+
125+
/** minimum frequency to consider a vocabulary word */
126+
private var minCount = 5
127+
128+
/** Sets the minimum frequency a token must appear to be included in the word2vec model's
129+
* vocabulary (default: 5).
130+
*/
131+
def setMinCount(minCount: Int): this.type = {
132+
this.minCount = minCount
133+
this
134+
}
132135

133136
private var trainWordsCount = 0
134137
private var vocabSize = 0

0 commit comments

Comments
 (0)