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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org