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

    https://github.com/apache/spark/pull/8246#discussion_r39216763
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala ---
    @@ -1056,6 +988,70 @@ object DecisionTree extends Serializable with Logging 
{
         }
       }
     
    +  private def findSplitsBinsBySorting(
    +      input: RDD[LabeledPoint],
    +      metadata: DecisionTreeMetadata,
    +      continuousFeatures: IndexedSeq[Int]): (Array[Array[Split]], 
Array[Array[Bin]]) = {
    +    def findSplits(
    +        featureIndex: Int,
    +        featureSamples: Iterable[Double]): (Int, (Array[Split], 
Array[Bin])) = {
    +      val splits = {
    +        val featureSplits = findSplitsForContinuousFeature(
    +          featureSamples.toArray,
    +          metadata,
    +          featureIndex)
    +        logDebug(s"featureIndex = $featureIndex, numSplits = 
${featureSplits.length}")
    +
    +        featureSplits.map(threshold => new Split(featureIndex, threshold, 
Continuous, Nil))
    +      }
    +
    +      val bins = {
    +        val lowSplit = new DummyLowSplit(featureIndex, Continuous)
    +        val highSplit = new DummyHighSplit(featureIndex, Continuous)
    +        (lowSplit +: splits.toSeq :+ highSplit).sliding(2).map {
    --- End diff --
    
    Done.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to