aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/ml/classification.py
diff options
context:
space:
mode:
authorXiangrui Meng <meng@databricks.com>2015-04-15 23:49:42 -0700
committerXiangrui Meng <meng@databricks.com>2015-04-15 23:49:42 -0700
commit57cd1e86d1d450f85fc9e296aff498a940452113 (patch)
tree10e973e431fc3ca3e92c823eed077dae5772f5f5 /python/pyspark/ml/classification.py
parent52c3439a8a107ce1fc10e4f0b59fd7881e851622 (diff)
downloadspark-57cd1e86d1d450f85fc9e296aff498a940452113.tar.gz
spark-57cd1e86d1d450f85fc9e296aff498a940452113.tar.bz2
spark-57cd1e86d1d450f85fc9e296aff498a940452113.zip
[SPARK-6893][ML] default pipeline parameter handling in python
Same as #5431 but for Python. jkbradley Author: Xiangrui Meng <meng@databricks.com> Closes #5534 from mengxr/SPARK-6893 and squashes the following commits: d3b519b [Xiangrui Meng] address comments ebaccc6 [Xiangrui Meng] style update fce244e [Xiangrui Meng] update explainParams with test 4d6b07a [Xiangrui Meng] add tests 5294500 [Xiangrui Meng] update default param handling in python
Diffstat (limited to 'python/pyspark/ml/classification.py')
-rw-r--r--python/pyspark/ml/classification.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/pyspark/ml/classification.py b/python/pyspark/ml/classification.py
index 7f42de531f..d7bc09fd77 100644
--- a/python/pyspark/ml/classification.py
+++ b/python/pyspark/ml/classification.py
@@ -59,6 +59,7 @@ class LogisticRegression(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredicti
maxIter=100, regParam=0.1)
"""
super(LogisticRegression, self).__init__()
+ self._setDefault(maxIter=100, regParam=0.1)
kwargs = self.__init__._input_kwargs
self.setParams(**kwargs)
@@ -71,7 +72,7 @@ class LogisticRegression(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredicti
Sets params for logistic regression.
"""
kwargs = self.setParams._input_kwargs
- return self._set_params(**kwargs)
+ return self._set(**kwargs)
def _create_model(self, java_model):
return LogisticRegressionModel(java_model)