public class KMeansClustering extends Object implements Serializable
Constructor and Description |
---|
KMeansClustering(Integer nbCluster) |
KMeansClustering(Integer nbCluster,
Class<? extends DistanceFunction> clazz) |
Modifier and Type | Method and Description |
---|---|
Integer |
classify(org.jblas.DoubleMatrix features) |
protected org.jblas.DoubleMatrix |
computeDxs()
For each features in
KMeans#initFeatures , compute D(x), the
distance between x and the nearest center that has already been chosen. |
org.jblas.DoubleMatrix |
distribution(org.jblas.DoubleMatrix features) |
org.jblas.DoubleMatrix |
getCentroids() |
protected void |
initCentroids()
Init clusters using the k-means++ algorithm.
|
protected void |
initIfPossible(org.jblas.DoubleMatrix features) |
protected boolean |
isReady() |
protected Integer |
nearestCentroid(org.jblas.DoubleMatrix features) |
void |
reset() |
Integer |
update(org.jblas.DoubleMatrix features) |
public KMeansClustering(Integer nbCluster, Class<? extends DistanceFunction> clazz)
public KMeansClustering(Integer nbCluster)
public Integer classify(org.jblas.DoubleMatrix features)
public Integer update(org.jblas.DoubleMatrix features)
public org.jblas.DoubleMatrix distribution(org.jblas.DoubleMatrix features)
public org.jblas.DoubleMatrix getCentroids()
protected Integer nearestCentroid(org.jblas.DoubleMatrix features)
protected boolean isReady()
protected void initIfPossible(org.jblas.DoubleMatrix features)
protected void initCentroids()
protected org.jblas.DoubleMatrix computeDxs()
KMeans#initFeatures
, compute D(x), the
distance between x and the nearest center that has already been chosen.public void reset()
Copyright © 2014. All Rights Reserved.