Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15913#discussion_r89537771
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/tree/treeParams.scala ---
    @@ -443,12 +425,11 @@ private[ml] trait GBTParams extends 
TreeEnsembleParams with HasMaxIter with HasS
        * (default = 0.1)
        * @group setParam
        */
    -  def setStepSize(value: Double): this.type = set(stepSize, value)
    -
    -  override def validateParams(): Unit = {
    +  def setStepSize(value: Double): this.type = {
         require(ParamValidators.inRange(0, 1, lowerInclusive = false, 
upperInclusive = true)(
    --- End diff --
    
    This validation should really be in the Param itself.  It's not since it's 
a sharedParam, but perhaps we should just copy the shared Param code here.  The 
problem with putting validation in the setter is that Params can get set in 
other ways too (such as ```gbt.set(stepSize, value)```


---
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]

Reply via email to