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

    https://github.com/apache/spark/pull/3951#discussion_r23500733
  
    --- Diff: python/pyspark/mllib/tree.py ---
    @@ -24,7 +24,41 @@
     from pyspark.mllib.linalg import _convert_to_vector
     from pyspark.mllib.regression import LabeledPoint
     
    -__all__ = ['DecisionTreeModel', 'DecisionTree', 'RandomForestModel', 
'RandomForest']
    +__all__ = ['TreeEnsembleModel', 'DecisionTreeModel', 'DecisionTree', 
'RandomForestModel',
    +           'RandomForest', 'GradientBoostedTrees']
    +
    +
    +class TreeEnsembleModel(JavaModelWrapper):
    +    def predict(self, x):
    +        """
    +        Predict values for a single data point or an RDD of points using
    +        the model trained.
    +        """
    +        if isinstance(x, RDD):
    +            return self.call("predict", x.map(_convert_to_vector))
    +
    +        else:
    +            return self.call("predict", _convert_to_vector(x))
    +
    +    def numTrees(self):
    +        """
    +        Get number of trees in forest.
    --- End diff --
    
    "forest" --> "ensemble"


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