Skip to content

Commit

Permalink
Add the placeholders in Python
Browse files Browse the repository at this point in the history
  • Loading branch information
yu-iskw committed Jul 16, 2015
1 parent 4a03003 commit f8338bc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions python/pyspark/ml/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ class KMeans(JavaEstimator, HasFeaturesCol, HasMaxIter, HasSeed):
TypeError: Method setParams forces keyword arguments.
"""

# a placeholder to make it appear in the generated doc
k = Param(Params._dummy(), "k", "number of clusters to create")
epsilon = Param(Params._dummy(), "epsilon",
"distance threshold within which " +
"we've consider centers to have converged")
runs = Param(Params._dummy(), "runs", "number of runs of the algorithm to execute in parallel")
initMode = Param(Params._dummy(), "initMode",
"the initialization algorithm. This can be either \"random\" to " +
"choose random points as initial cluster centers, or \"k-means||\" " +
"to use a parallel variant of k-means++")
initSteps = Param(Params._dummy(), "initSteps", "steps for k-means initialization mode")

@keyword_only
def __init__(self, k=2, maxIter=20, runs=1, epsilon=1e-4, initMode="k-means||", initStep=5):
super(KMeans, self).__init__()
Expand Down

0 comments on commit f8338bc

Please sign in to comment.