Class KMeansSummary

Object
org.apache.spark.ml.clustering.ClusteringSummary
org.apache.spark.ml.clustering.KMeansSummary
All Implemented Interfaces:
Serializable

public class KMeansSummary extends ClusteringSummary
Summary of KMeans.

param: predictions DataFrame produced by KMeansModel.transform(). param: predictionCol Name for column of predicted clusters in predictions. param: featuresCol Name for column of features in predictions. param: k Number of clusters. param: numIter Number of iterations. param: trainingCost K-means cost (sum of squared distances to the nearest centroid for all points in the training dataset). This is equivalent to sklearn's inertia.

See Also:
  • Method Details

    • trainingCost

      public double trainingCost()