Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/21129#discussion_r186572853
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/classification/GBTClassifier.scala ---
@@ -146,20 +146,40 @@ class GBTClassifier @Since("1.4.0") (
@Since("1.4.0")
def setLossType(value: String): this.type = set(lossType, value)
+ /** @group setParam */
+ @Since("2.4.0")
+ override def setValidationIndicatorCol(value: String): this.type = {
+ set(validationIndicatorCol, value)
+ }
+
override protected def train(dataset: Dataset[_]):
GBTClassificationModel = {
val categoricalFeatures: Map[Int, Int] =
MetadataUtils.getCategoricalFeatures(dataset.schema($(featuresCol)))
+
+ val withValidation = isDefined(validationIndicatorCol)
--- End diff --
Let's do: `isDefined(validationIndicatorCol) and
$(validationIndicatorCol).nonEmpty` (so we count "" as not defined).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]