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

    https://github.com/apache/spark/pull/12536#discussion_r60618750
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/DecisionTreeClassifier.scala
 ---
    @@ -94,17 +94,33 @@ final class DecisionTreeClassifier @Since("1.4.0") (
         }
         val oldDataset: RDD[LabeledPoint] = extractLabeledPoints(dataset)
         val strategy = getOldStrategy(categoricalFeatures, numClasses)
    +
    +    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[DecisionTreeClassificationModel]
    +
    +    instr.logNumFeatures(oldDataset.first().features.size)
    +    instr.logNumClasses(numClasses)
    +
    +    val m = trees.head.asInstanceOf[DecisionTreeClassificationModel]
    +    instr.logSuccess(m)
    +    m
       }
     
       /** (private[ml]) Train a decision tree on an RDD */
       private[ml] def train(data: RDD[LabeledPoint],
           oldStrategy: OldStrategy): DecisionTreeClassificationModel = {
    +    val instr = Instrumentation.create(this, data)
    +    instr.logParams(params: _*)
    --- End diff --
    
    based on the comment above, you can also log the # of features here.


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