Github user sethah commented on a diff in the pull request:
https://github.com/apache/spark/pull/15913#discussion_r89360295
--- 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 --
I think it's better to fail at set time rather than when `fit` is called.
This was _also_ not used before, seems we missed it when we deprecated
`validateParams()` ?
---
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]