diff options
author | Yanbo Liang <ybliang8@gmail.com> | 2016-08-11 22:39:19 -0700 |
---|---|---|
committer | Yanbo Liang <ybliang8@gmail.com> | 2016-08-11 22:39:19 -0700 |
commit | ccc6dc0f4b62837c73fca0e3c8b9c14be798b062 (patch) | |
tree | eae5a43aeccc88fad5377ffa6cd6582868daf81e /python/pyspark | |
parent | ac84fb64dd85257da06f93a48fed9bb188140423 (diff) | |
download | spark-ccc6dc0f4b62837c73fca0e3c8b9c14be798b062.tar.gz spark-ccc6dc0f4b62837c73fca0e3c8b9c14be798b062.tar.bz2 spark-ccc6dc0f4b62837c73fca0e3c8b9c14be798b062.zip |
[MINOR][ML] Rename TreeEnsembleModels to TreeEnsembleModel for PySpark
## What changes were proposed in this pull request?
Fix the typo of ```TreeEnsembleModels``` for PySpark, it should ```TreeEnsembleModel``` which will be consistent with Scala. What's more, it represents a tree ensemble model, so ```TreeEnsembleModel``` should be more reasonable. This should not be used public, so it will not involve breaking change.
## How was this patch tested?
No new tests, should pass existing ones.
Author: Yanbo Liang <ybliang8@gmail.com>
Closes #14454 from yanboliang/TreeEnsembleModel.
Diffstat (limited to 'python/pyspark')
-rw-r--r-- | python/pyspark/ml/classification.py | 6 | ||||
-rw-r--r-- | python/pyspark/ml/regression.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/python/pyspark/ml/classification.py b/python/pyspark/ml/classification.py index 9a3c7b1596..6468007045 100644 --- a/python/pyspark/ml/classification.py +++ b/python/pyspark/ml/classification.py @@ -22,7 +22,7 @@ from pyspark import since, keyword_only from pyspark.ml import Estimator, Model from pyspark.ml.param.shared import * from pyspark.ml.regression import DecisionTreeModel, DecisionTreeRegressionModel, \ - RandomForestParams, TreeEnsembleModels, TreeEnsembleParams + RandomForestParams, TreeEnsembleModel, TreeEnsembleParams from pyspark.ml.util import * from pyspark.ml.wrapper import JavaEstimator, JavaModel, JavaParams from pyspark.ml.wrapper import JavaWrapper @@ -722,7 +722,7 @@ class RandomForestClassifier(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPred return RandomForestClassificationModel(java_model) -class RandomForestClassificationModel(TreeEnsembleModels, JavaMLWritable, JavaMLReadable): +class RandomForestClassificationModel(TreeEnsembleModel, JavaMLWritable, JavaMLReadable): """ Model fitted by RandomForestClassifier. @@ -873,7 +873,7 @@ class GBTClassifier(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredictionCol return self.getOrDefault(self.lossType) -class GBTClassificationModel(TreeEnsembleModels, JavaMLWritable, JavaMLReadable): +class GBTClassificationModel(TreeEnsembleModel, JavaMLWritable, JavaMLReadable): """ Model fitted by GBTClassifier. diff --git a/python/pyspark/ml/regression.py b/python/pyspark/ml/regression.py index d88dc75353..1ae2bd4e40 100644 --- a/python/pyspark/ml/regression.py +++ b/python/pyspark/ml/regression.py @@ -749,7 +749,7 @@ class DecisionTreeModel(JavaModel): @inherit_doc -class TreeEnsembleModels(JavaModel): +class TreeEnsembleModel(JavaModel): """ (private abstraction) @@ -909,7 +909,7 @@ class RandomForestRegressor(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredi return RandomForestRegressionModel(java_model) -class RandomForestRegressionModel(TreeEnsembleModels, JavaMLWritable, JavaMLReadable): +class RandomForestRegressionModel(TreeEnsembleModel, JavaMLWritable, JavaMLReadable): """ Model fitted by :class:`RandomForestRegressor`. @@ -1047,7 +1047,7 @@ class GBTRegressor(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredictionCol, return self.getOrDefault(self.lossType) -class GBTRegressionModel(TreeEnsembleModels, JavaMLWritable, JavaMLReadable): +class GBTRegressionModel(TreeEnsembleModel, JavaMLWritable, JavaMLReadable): """ Model fitted by :class:`GBTRegressor`. |