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

    https://github.com/apache/spark/pull/2125#discussion_r16864683
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala ---
    @@ -65,36 +66,39 @@ class DecisionTree (private val strategy: Strategy) 
extends Serializable with Lo
         val retaggedInput = input.retag(classOf[LabeledPoint])
         val metadata = DecisionTreeMetadata.buildMetadata(retaggedInput, 
strategy)
         logDebug("algo = " + strategy.algo)
    +    logDebug("maxBins = " + metadata.maxBins)
     
         // Find the splits and the corresponding bins (interval between the 
splits) using a sample
         // of the input data.
         timer.start("findSplitsBins")
         val (splits, bins) = DecisionTree.findSplitsBins(retaggedInput, 
metadata)
    -    val numBins = bins(0).length
         timer.stop("findSplitsBins")
    -    logDebug("numBins = " + numBins)
    +    logDebug("numBins: feature: number of bins")
    +    Range(0, metadata.numFeatures).foreach { featureIndex =>
    +      logDebug(s"\t$featureIndex\t${metadata.numBins(featureIndex)}")
    --- End diff --
    
    The foreach will be executed even when debug mode is off.


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