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

    https://github.com/apache/spark/pull/20632#discussion_r168922746
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/tree/Node.scala ---
    @@ -287,6 +292,41 @@ private[tree] class LearningNode(
         }
       }
     
    +  /**
    +   * Method testing whether a node is a leaf.
    +   * @return true iff a node is a leaf.
    +   */
    +  private def isLeafNode(): Boolean = leftChild.isEmpty && 
rightChild.isEmpty
    +
    +  /** True iff the node should be a leaf. */
    --- End diff --
    
    Likewise an example of the kind of comment that seems to just restate the 
method name.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to