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

    https://github.com/apache/spark/pull/10601#discussion_r50582231
  
    --- Diff: python/pyspark/mllib/tree.py ---
    @@ -154,21 +155,31 @@ def trainClassifier(cls, data, numClasses, 
categoricalFeaturesInfo,
             """
             Train a DecisionTreeModel for classification.
     
    -        :param data: Training data: RDD of LabeledPoint.
    -                     Labels are integers {0,1,...,numClasses}.
    -        :param numClasses: Number of classes for classification.
    -        :param categoricalFeaturesInfo: Map from categorical feature index
    -                                        to number of categories.
    -                                        Any feature not in this map
    -                                        is treated as continuous.
    -        :param impurity: Supported values: "entropy" or "gini"
    -        :param maxDepth: Max depth of tree.
    -                         E.g., depth 0 means 1 leaf node.
    -                         Depth 1 means 1 internal node + 2 leaf nodes.
    -        :param maxBins: Number of bins used for finding splits at each 
node.
    -        :param minInstancesPerNode: Min number of instances required at 
child
    -                                    nodes to create the parent split
    -        :param minInfoGain: Min info gain required to create a split
    +        :param data:
    +          Training data: RDD of LabeledPoint. Labels are integers
    +          {0,1,...,numClasses}.
    +        :param numClasses:
    +          Number of classes for classification.
    +        :param categoricalFeaturesInfo:
    +          Map from categorical feature index to number of categories. Any
    +          feature not in this map is treated as continuous.
    +        :param impurity:
    +          Supported values: "entropy" or "gini".
    +          (default: "gini")
    +        :param maxDepth:
    +          Max depth of tree. E.g., depth 0 means 1 leaf node. Depth 1
    +          means 1 internal node + 2 leaf nodes.
    +          (default: 5)
    +        :param maxBins:
    +          Number of bins used for finding splits at each node.
    +          (default: 32)
    +        :param minInstancesPerNode:
    +          Min number of instances required at child nodes to create the
    +          parent split.
    +          (default: 1)
    +        :param minInfoGain:
    +          Min info gain required to create a split.
    +          (default: 0.0)
             :return: DecisionTreeModel
    --- End diff --
    
    The JIRA description did not say anything about the return value, but I 
think we should follow similar formatting if it's within the same comment 
block.  Would you mind changing the return descriptions to this format?
    
    ```
             :return:
               DecisionTreeModel
    ```



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