[ 
https://issues.apache.org/jira/browse/SPARK-18518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

zhengruifeng resolved SPARK-18518.
----------------------------------
    Resolution: Not A Problem

> HasSolver should support allowed values
> ---------------------------------------
>
>                 Key: SPARK-18518
>                 URL: https://issues.apache.org/jira/browse/SPARK-18518
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>            Reporter: zhengruifeng
>            Assignee: zhengruifeng
>            Priority: Major
>
> {{HasSolver}} now don't support value validation, so it's not easy to use:
> GLR and LiR inherit HasSolver, but need to do param validation explicitly 
> like:
> {code}
> require(Set("auto", "l-bfgs", "normal").contains(value),
>       s"Solver $value was not supported. Supported options: auto, l-bfgs, 
> normal")
>     set(solver, value)
> {code}
> MLPC even don't inherit {{HasSolver}}, and create param solver with 
> supportedSolvers:
> {code}
>   final val solver: Param[String] = new Param[String](this, "solver",
>     "The solver algorithm for optimization. Supported options: " +
>       s"${MultilayerPerceptronClassifier.supportedSolvers.mkString(", ")}. 
> (Default l-bfgs)",
>     
> ParamValidators.inArray[String](MultilayerPerceptronClassifier.supportedSolvers))
> {code}
> It may be reasonable to modify {{HasSolver}} after 2.1



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to