Github user thunterdb commented on a diff in the pull request:
https://github.com/apache/spark/pull/12536#discussion_r61168881
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/regression/DecisionTreeRegressor.scala
---
@@ -88,17 +88,30 @@ final class DecisionTreeRegressor @Since("1.4.0")
(@Since("1.4.0") override val
MetadataUtils.getCategoricalFeatures(dataset.schema($(featuresCol)))
val oldDataset: RDD[LabeledPoint] = extractLabeledPoints(dataset)
val strategy = getOldStrategy(categoricalFeatures)
+
+ val instr = Instrumentation.create(this, oldDataset)
+ instr.logParams(params: _*)
+
val trees = RandomForest.run(oldDataset, strategy, numTrees = 1,
featureSubsetStrategy = "all",
- seed = $(seed), parentUID = Some(uid))
- trees.head.asInstanceOf[DecisionTreeRegressionModel]
+ seed = $(seed), instr, parentUID = Some(uid))
--- End diff --
I suggest you give the name of the parameter when you have a list of named
arguments. In this case, it does not change the meaning of the code, but in
some cases with default arguments, this may become ambiguous if we decide to
add more arguments.
---
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]