Package edu.cmu.tetrad.search.unmix
Class KMeans.Result
java.lang.Object
edu.cmu.tetrad.search.unmix.KMeans.Result
- Enclosing class:
- KMeans
Represents the result of a clustering operation using the KMeans algorithm. The result includes the assignments
 of data points to clusters (labels) and the centroids of the clusters.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionResult(int[] labels, double[][] centroids) Constructs a Result object containing the clustering assignments of data points to clusters and the centroids of the clusters computed by a clustering algorithm.
- 
Method Summary
- 
Field Details- 
labelspublic final int[] labelsAn array representing the cluster assignments for each data point after the KMeans clustering operation. Each entry in the array corresponds to a specific data point, and its value indicates the index of the cluster to which the data point belongs.
- 
centroidspublic final double[][] centroidsA 2-dimensional array representing the centroids of clusters computed by the KMeans algorithm. Each row in the array corresponds to a cluster centroid, and each column represents one of the dimensions of the feature space. The values in the array are the coordinates of the centroids in the feature space.
 
- 
- 
Constructor Details- 
Resultpublic Result(int[] labels, double[][] centroids) Constructs a Result object containing the clustering assignments of data points to clusters and the centroids of the clusters computed by a clustering algorithm.- Parameters:
- labels- An array representing the cluster assignments for each data point. Each element in the array corresponds to a specific data point and indicates the index of the cluster to which the data point was assigned.
- centroids- A 2-dimensional array representing the coordinates of the cluster centroids. Each row in the array corresponds to a cluster centroid, and each column represents a dimension in the feature space.
 
 
-