Skip to content

Commit

Permalink
update doc conf and move embedded param map to instance attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed Jan 27, 2015
1 parent f4d0fe6 commit d5efd34
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
5 changes: 4 additions & 1 deletion python/docs/pyspark.ml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pyspark.ml module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pyspark.ml.param module
-----------------------
Expand All @@ -19,6 +20,7 @@ pyspark.ml.param module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pyspark.ml.feature module
-------------------------
Expand All @@ -27,12 +29,13 @@ pyspark.ml.feature module
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

pyspark.ml.classification module
--------------------------------

.. automodule:: pyspark.ml.classification
:members:
:undoc-members:
:inherited-members:
:show-inheritance:
:inherited-members:
11 changes: 5 additions & 6 deletions python/pyspark/ml/param/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ class Params(Identifiable):

__metaclass__ = ABCMeta

#: Internal param map.
paramMap = {}

def __init__(self):
super(Params, self).__init__()
#: embedded param map
self.paramMap = {}

def params(self):
"""
Expand All @@ -65,6 +64,6 @@ def params(self):
return filter(lambda x: isinstance(x, Param), map(lambda x: getattr(self, x), dir(self)))

def _merge_params(self, params):
map = self.paramMap.copy()
map.update(params)
return map
paramMap = self.paramMap.copy()
paramMap.update(params)
return paramMap

0 comments on commit d5efd34

Please sign in to comment.