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

    https://github.com/apache/spark/pull/2332#discussion_r17321579
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/tree/model/Split.scala ---
    @@ -66,3 +68,11 @@ private[tree] class DummyHighSplit(feature: Int, 
featureType: FeatureType)
     private[tree] class DummyCategoricalSplit(feature: Int, featureType: 
FeatureType)
       extends Split(feature, Double.MaxValue, featureType, List())
     
    +private[tree] object Split {
    +  /**
    +   * A [[org.apache.spark.mllib.tree.model.Split]] object to denote that
    +   * we can't find a valid split that satisfies minimum info gain
    +   * or minimum number of instances per node.
    +   */
    +  val noSplit = new Split(-1, Double.MinValue, FeatureType.Continuous, 
List())
    --- End diff --
    
    noSplit is never really used, so it could be removed.  I would treat splits 
as normal (returning a split even if its gain is invalid); this should work 
since the split is never checked against noSplit (since the gain has all needed 
information).


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