KMeansSummary (Spark 3.5.5 JavaDoc) (original) (raw)
Object
- org.apache.spark.ml.clustering.ClusteringSummary
- org.apache.spark.ml.clustering.KMeansSummary
All Implemented Interfaces:
java.io.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:
Serialized Form
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type Method and Description double trainingCost() * ### Methods inherited from class org.apache.spark.ml.clustering.[ClusteringSummary](../../../../../org/apache/spark/ml/clustering/ClusteringSummary.html "class in org.apache.spark.ml.clustering") `[cluster](../../../../../org/apache/spark/ml/clustering/ClusteringSummary.html#cluster--), [clusterSizes](../../../../../org/apache/spark/ml/clustering/ClusteringSummary.html#clusterSizes--), [featuresCol](../../../../../org/apache/spark/ml/clustering/ClusteringSummary.html#featuresCol--), [k](../../../../../org/apache/spark/ml/clustering/ClusteringSummary.html#k--), [numIter](../../../../../org/apache/spark/ml/clustering/ClusteringSummary.html#numIter--), [predictionCol](../../../../../org/apache/spark/ml/clustering/ClusteringSummary.html#predictionCol--), [predictions](../../../../../org/apache/spark/ml/clustering/ClusteringSummary.html#predictions--)` * ### Methods inherited from class Object `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
Method Detail
* #### trainingCost public double trainingCost()