You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "zhengruifeng (JIRA)" <ji...@apache.org> on 2016/11/21 05:53:58 UTC
[jira] [Created] (SPARK-18518) HasSolver should support allowed
values
zhengruifeng created SPARK-18518:
------------------------------------
Summary: 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
Priority: Minor
{{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
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org