Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed Apr 16, 2015
1 parent ebaccc6 commit d3b519b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import java.util.UUID
private[ml] trait Identifiable extends Serializable {

/**
* A unique id for the object. The default implementation concatenates the class name, "-", and 8
* A unique id for the object. The default implementation concatenates the class name, "_", and 8
* random hex chars.
*/
private[ml] val uid: String =
Expand Down
10 changes: 5 additions & 5 deletions python/pyspark/ml/param/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class Params(Identifiable):
@property
def params(self):
"""
Returns all params. The default implementation uses
:py:func:`dir` to get all attributes of type
Returns all params ordered by name. The default implementation
uses :py:func:`dir` to get all attributes of type
:py:class:`Param`.
"""
return filter(lambda attr: isinstance(attr, Param),
Expand Down Expand Up @@ -139,8 +139,8 @@ def extractParamMap(self, extraParamMap={}):
"""
Extracts the embedded default param values and user-supplied
values, and then merges them with extra values from input into
a flat param map, where the latter values is used if there
exist conflicts, i.e., with ordering: default param values <
a flat param map, where the latter value is used if there exist
conflicts, i.e., with ordering: default param values <
user-supplied values < extraParamMap.
:param extraParamMap: extra param values
:return: merged param map
Expand All @@ -161,7 +161,7 @@ def _resolveParam(self, param):
"""
Resolves a param and validates the ownership.
:param param: param name or the param instance, which must
belongs to this Params instance
belong to this Params instance
:return: resolved param instance
"""
if isinstance(param, Param):
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/ml/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Identifiable(object):

def __init__(self):
#: A unique id for the object. The default implementation
#: concatenates the class name, "-", and 8 random hex chars.
#: concatenates the class name, "_", and 8 random hex chars.
self.uid = type(self).__name__ + "_" + uuid.uuid4().hex[:8]

def __repr__(self):
Expand Down

0 comments on commit d3b519b

Please sign in to comment.