Skip to content

Commit d5efd34

Browse files
committed
update doc conf and move embedded param map to instance attribute
1 parent f4d0fe6 commit d5efd34

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

python/docs/pyspark.ml.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ pyspark.ml module
1111
:members:
1212
:undoc-members:
1313
:show-inheritance:
14+
:inherited-members:
1415

1516
pyspark.ml.param module
1617
-----------------------
@@ -19,6 +20,7 @@ pyspark.ml.param module
1920
:members:
2021
:undoc-members:
2122
:show-inheritance:
23+
:inherited-members:
2224

2325
pyspark.ml.feature module
2426
-------------------------
@@ -27,12 +29,13 @@ pyspark.ml.feature module
2729
:members:
2830
:undoc-members:
2931
:show-inheritance:
32+
:inherited-members:
3033

3134
pyspark.ml.classification module
3235
--------------------------------
3336

3437
.. automodule:: pyspark.ml.classification
3538
:members:
3639
:undoc-members:
37-
:inherited-members:
3840
:show-inheritance:
41+
:inherited-members:

python/pyspark/ml/param/__init__.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,10 @@ class Params(Identifiable):
5050

5151
__metaclass__ = ABCMeta
5252

53-
#: Internal param map.
54-
paramMap = {}
55-
5653
def __init__(self):
5754
super(Params, self).__init__()
55+
#: embedded param map
56+
self.paramMap = {}
5857

5958
def params(self):
6059
"""
@@ -65,6 +64,6 @@ def params(self):
6564
return filter(lambda x: isinstance(x, Param), map(lambda x: getattr(self, x), dir(self)))
6665

6766
def _merge_params(self, params):
68-
map = self.paramMap.copy()
69-
map.update(params)
70-
return map
67+
paramMap = self.paramMap.copy()
68+
paramMap.update(params)
69+
return paramMap

0 commit comments

Comments
 (0)