GitHub user mgaido91 opened a pull request:

    https://github.com/apache/spark/pull/20629

    [SPARK-23451][ML] Deprecate KMeans.computeCost

    ## What changes were proposed in this pull request?
    
    Deprecate `KMeans.computeCost` which was introduced as a temp fix and now 
it is not needed anymore, since we introduced `ClusteringEvaluator`.
    
    ## How was this patch tested?
    
    manual test (deprecation warning displayed)
    Scala
    ```
    ...
    scala> model.computeCost(dataset)
    warning: there was one deprecation warning; re-run with -deprecation for 
details
    res1: Double = 0.0
    ```
    
    Python
    ```
    >>> import warnings
    >>> warnings.simplefilter('always', DeprecationWarning)
    ...
    >>> model.computeCost(df)
    /Users/mgaido/apache/spark/python/pyspark/ml/clustering.py:330: 
DeprecationWarning: Deprecated in 2.4.0. It will be removed in 3.0.0. Use 
ClusteringEvaluator instead.
      " instead.", DeprecationWarning)
    ```


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mgaido91/spark SPARK-23451

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/20629.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #20629
    
----
commit 2f79bb2d5c7e29e85a4a7abe63254d392a49fe53
Author: Marco Gaido <marcogaido91@...>
Date:   2018-02-16T16:03:09Z

    [SPARK-23451][ML] Deprecate KMeans.computeCost

----


---

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

Reply via email to