Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-30165 Eliminate compilation warnings
  3. SPARK-30678

Eliminate warnings from deprecated BisectingKMeansModel.computeCost

Attach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.0
    • Component/s: MLlib
    • Labels:
      None

      Description

      The computeCost() method of the BisectingKMeansModel class has been deprecated. That causes warnings while compiling BisectingKMeansSuite:

      [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
      

       

        Attachments

          Activity

            People

            • Assignee:
              maxgekk Maxim Gekk
              Reporter:
              maxgekk Maxim Gekk

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment