[ 
https://issues.apache.org/jira/browse/SPARK-30678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dongjoon Hyun resolved SPARK-30678.
-----------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

Issue resolved by pull request 27401
[https://github.com/apache/spark/pull/27401]

> Eliminate warnings from deprecated BisectingKMeansModel.computeCost
> -------------------------------------------------------------------
>
>                 Key: SPARK-30678
>                 URL: https://issues.apache.org/jira/browse/SPARK-30678
>             Project: Spark
>          Issue Type: Sub-task
>          Components: MLlib
>    Affects Versions: 3.0.0
>            Reporter: Maxim Gekk
>            Assignee: Maxim Gekk
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> The computeCost() method of the BisectingKMeansModel class has been 
> deprecated. That causes warnings while compiling BisectingKMeansSuite:
> {code}
> [warn] 
> /Users/maxim/proj/kmeans-computeCost-warning/mllib/src/test/scala/org/apache/spark/ml/clustering/BisectingKMeansSuite.scala:108:
>  method computeCost in class BisectingKMeansModel is deprecated (since 
> 3.0.0): This method is deprecated and will be removed in future versions. Use 
> ClusteringEvaluator instead. You can also get the cost on the training 
> dataset in the summary.
> [warn]     assert(model.computeCost(dataset) < 0.1)
> [warn]                  ^
> [warn] 
> /Users/maxim/proj/kmeans-computeCost-warning/mllib/src/test/scala/org/apache/spark/ml/clustering/BisectingKMeansSuite.scala:135:
>  method computeCost in class BisectingKMeansModel is deprecated (since 
> 3.0.0): This method is deprecated and will be removed in future versions. Use 
> ClusteringEvaluator instead. You can also get the cost on the training 
> dataset in the summary.
> [warn]     assert(model.computeCost(dataset) == summary.trainingCost)
> [warn]                  ^
> [warn] 
> /Users/maxim/proj/kmeans-computeCost-warning/mllib/src/test/scala/org/apache/spark/ml/clustering/BisectingKMeansSuite.scala:323:
>  method computeCost in class BisectingKMeansModel is deprecated (since 
> 3.0.0): This method is deprecated and will be removed in future versions. Use 
> ClusteringEvaluator instead. You can also get the cost on the training 
> dataset in the summary.
> [warn]       model.computeCost(dataset)
> [warn]             ^
> [warn] three warnings found
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to