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

    https://github.com/apache/spark/pull/21465#discussion_r236880776
  
    --- Diff: python/pyspark/ml/regression.py ---
    @@ -705,12 +705,38 @@ def getNumTrees(self):
             return self.getOrDefault(self.numTrees)
     
     
    -class GBTParams(TreeEnsembleParams):
    +class GBTParams(TreeEnsembleParams, HasMaxIter, HasStepSize, 
HasValidationIndicatorCol):
    --- End diff --
    
    I like having a common `GBTParams` class, it was strange to have 2 of the 
same name. But you should also define `GBTClassifierParams` and 
`GBTRegressorParams`, then put the `supportedLossTypes` in there so you don't 
need to override them later. You can also put the `lossType` param and 
`getLossType()` method there.  This makes it clean and follows how it's done in 
Scala.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to