Github user yanboliang commented on a diff in the pull request:
https://github.com/apache/spark/pull/8884#discussion_r40529250
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala ---
@@ -357,4 +357,17 @@ private[ml] trait HasWeightCol extends Params {
/** @group getParam */
final def getWeightCol: String = $(weightCol)
}
+
+/**
+ * Trait for the solver algorithm for optimization.
+ */
+private[ml] trait HasSolver extends Params {
+ /**
+ * Param for solver algorithm. If this is not set or empty, we select
the solver algorithm automatically.
+ */
+ final val solver: Param[String] = new Param[String](this, "solver", "the
solver algorithm for optimization. If this is not set or empty, default value
is 'auto'.")
--- End diff --
Shall we have a validation function here to check the ```solver``` is set
with legal value? Such as if users set ```solver``` with ```normal``` but the
number of features is more than 4096, throwing exception here.
[WeightedLeastSquares](https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/ml/optim/WeightedLeastSquares.scala#L173)
will check this after job starting, but I think we should detect this error
earlier.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]