public final class KMeansModel extends Object implements ClusterizationModel<Vector,Integer>, Exportable<KMeansModelFormat>, DeployableObject
| Constructor and Description |
|---|
KMeansModel(Vector[] centers,
DistanceMeasure distanceMeasure)
Construct KMeans model with given centers and distanceMeasure measure.
|
| Modifier and Type | Method and Description |
|---|---|
DistanceMeasure |
distanceMeasure()
Distance measure.
|
boolean |
equals(Object obj) |
int |
getAmountOfClusters()
Gets the clusters count.
|
Vector[] |
getCenters()
Get cluster centers.
|
List<Object> |
getDependencies()
Returns dependencies of this object that can be object with class defined by client side and unknown for server.
|
int |
hashCode() |
Integer |
predict(Vector vec)
Make a prediction for the specified input arguments.
|
<P> void |
saveModel(Exporter<KMeansModelFormat,P> exporter,
P path)
Save model by the given path.
|
String |
toString() |
String |
toString(boolean pretty) |
public KMeansModel(Vector[] centers, DistanceMeasure distanceMeasure)
centers - Centers.distanceMeasure - Distance measure.public DistanceMeasure distanceMeasure()
public int getAmountOfClusters()
getAmountOfClusters in interface ClusterizationModel<Vector,Integer>public Vector[] getCenters()
getCenters in interface ClusterizationModel<Vector,Integer>public <P> void saveModel(Exporter<KMeansModelFormat,P> exporter, P path)
saveModel in interface Exportable<KMeansModelFormat>exporter - Exporter.path - Path to saved model.public String toString(boolean pretty)
toString in interface IgniteModel<Vector,Integer>pretty - Use pretty mode.public List<Object> getDependencies()
getDependencies in interface DeployableObject
GridGain In-Memory Computing Platform : ver. 8.9.26 Release Date : October 16 2025