Github user sethah commented on a diff in the pull request:
https://github.com/apache/spark/pull/17673#discussion_r142991123
--- Diff: mllib/src/main/scala/org/apache/spark/ml/feature/Word2Vec.scala
---
@@ -171,20 +210,46 @@ final class Word2Vec @Since("1.4.0") (
@Since("2.0.0")
def setMaxSentenceLength(value: Int): this.type = set(maxSentenceLength,
value)
+ /** @group setParam */
+ @Since("2.2.0")
+ val solvers = Set("sg-hs", "cbow-ns")
--- End diff --
Yeah, for reference you can just look at how linear regression does the
`supportedSolvers`. Also, the require isn't necessary, you can just use
`ParamValidators.inArray[String](supportedSolvers))`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]