public final class KMeansServingModel extends Object implements ClusteringServingModel
| Modifier and Type | Method and Description |
|---|---|
Pair<ClusterInfo,Double> |
closestCluster(double[] vector) |
ClusterInfo |
getCluster(int id) |
float |
getFractionLoaded() |
InputSchema |
getInputSchema() |
int |
getNumClusters() |
int |
nearestClusterID(String[] datum) |
String |
toString() |
void |
update(int clusterID,
double[] center,
long count) |
public int nearestClusterID(String[] datum)
nearestClusterID in interface ClusteringServingModeldatum - input features as parsed stringspublic int getNumClusters()
public ClusterInfo getCluster(int id)
public InputSchema getInputSchema()
public Pair<ClusterInfo,Double> closestCluster(double[] vector)
public void update(int clusterID,
double[] center,
long count)
public float getFractionLoaded()
getFractionLoaded in interface ServingModelCopyright © 2014–2018. All rights reserved.