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

    https://github.com/apache/spark/pull/1798#discussion_r15853962
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala ---
    @@ -300,6 +293,198 @@ object DecisionTree extends Serializable with Logging 
{
         new DecisionTree(strategy).train(input)
       }
     
    +  /**
    +   * Method to train a decision tree model.
    +   * The method supports binary and multiclass classification and 
regression.
    +   * This version takes basic types, for consistency with Python API.
    +   *
    +   * @param input Training dataset: RDD of 
[[org.apache.spark.mllib.regression.LabeledPoint]].
    +   *              For classification, labels should take values {0, 1, 
..., numClasses-1}.
    +   *              For regression, labels are real numbers.
    +   * @param algo "classification" or "regression"
    +   * @param numClassesForClassification number of classes for 
classification. Default value of 2.
    +   * @param categoricalFeaturesInfo Map storing arity of categorical 
features.
    +   *                                E.g., an entry (n -> k) indicates that 
feature n is categorical
    +   *                                with k categories indexed from 0: {0, 
1, ..., k-1}.
    +   * @param impurity criterion used for information gain calculation
    +   * @param maxDepth Maximum depth of the tree.
    +   *                 E.g., depth 0 means 1 leaf node; depth 1 means 1 
internal node + 2 leaf nodes.
    +   * @param maxBins maximum number of bins used for splitting features
    +   *                 (default Python value = 100)
    --- End diff --
    
    It is a little weird to reference the default value in Python here. We can 
change it into `suggested value: 100`.


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