spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkbradley <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-3158][MLLIB]Avoid 1 extra aggregation f...
Date Wed, 08 Oct 2014 19:30:46 GMT
Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2708#discussion_r18606429
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/tree/model/Node.scala ---
    @@ -170,7 +173,27 @@ private[tree] object Node {
       /**
        * Return a node with the given node id (but nothing else set).
        */
    -  def emptyNode(nodeIndex: Int): Node = new Node(nodeIndex, 0, false, None, None, None,
None)
    +  def emptyNode(nodeIndex: Int): Node = new Node(nodeIndex, new Predict(Double.MinValue),
-1.0,
    +    false, None, None, None, None)
    +
    +  /**
    +   * Construct a node with nodeIndex, predict, impurity and isLeaf parameters.
    +   * This is used in `DecisionTree.findBestSplits` to construct child nodes
    +   * after find best splits for each node.
    +   * Other fields are set at next level.
    +   * @param nodeIndex integer node id, from 1
    +   * @param predict predicted value at the node
    +   * @param impurity current node impurity
    +   * @param isLeaf whether the leaf is a node
    --- End diff --
    
    "whether the leaf is a node" --> "whether the node is a leaf"


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

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


Mime
View raw message