Github user yanboliang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10150#discussion_r47070681
  
    --- Diff: python/pyspark/mllib/clustering.py ---
    @@ -38,13 +38,175 @@
     from pyspark.mllib.util import Saveable, Loader, inherit_doc, JavaLoader, 
JavaSaveable
     from pyspark.streaming import DStream
     
    -__all__ = ['KMeansModel', 'KMeans', 'GaussianMixtureModel', 
'GaussianMixture',
    -           'PowerIterationClusteringModel', 'PowerIterationClustering',
    -           'StreamingKMeans', 'StreamingKMeansModel',
    +__all__ = ['BisectingKMeansModel', 'BisectingKMeans', 'KMeansModel', 
'KMeans',
    +           'GaussianMixtureModel', 'GaussianMixture', 
'PowerIterationClusteringModel',
    +           'PowerIterationClustering', 'StreamingKMeans', 
'StreamingKMeansModel',
                'LDA', 'LDAModel']
     
     
     @inherit_doc
    +class BisectingKMeansModel(JavaModelWrapper):
    +    """
    +    .. note:: Experimental
    +
    +    A clustering model derived from the bisecting k-means method.
    +
    +    >>> data = array([0.0,0.0, 1.0,1.0, 9.0,8.0, 8.0,9.0]).reshape(4, 2)
    +    >>> bskm = BisectingKMeans()
    +    >>> model = bskm.run(sc.parallelize(data))
    +    >>> model.predict(array([0.0, 0.0])) == model.predict(array([0.0, 
0.0]))
    +    True
    +    >>> model.k
    +    4
    +    >>> model.computeCost(array([0.0, 0.0]))
    +    0.0
    +    >>> model.k == len(model.clusterCenters)
    +    True
    +    >>> model = bskm.setK(2).run(sc.parallelize(data))
    +    >>> model.predict(array([0.0, 0.0])) == model.predict(array([1.0, 
1.0]))
    +    True
    +    >>> model.k
    +    2
    +
    +    .. versionadded:: 1.6.0
    --- End diff --
    
    I think we can not catch up with 1.6, so version related mark should be 
deleted.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to