|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object comirva.audio.util.kmeans.KMeansClustering.Cluster
protected class KMeansClustering.Cluster
A set of homogen points in the n-dimensional space is represented by a
Cluster
object.
Field Summary | |
---|---|
protected Matrix |
center
|
protected int |
N
|
Constructor Summary | |
---|---|
KMeansClustering.Cluster(Matrix mean)
Constructs a new cluster. |
Method Summary | |
---|---|
void |
add(Matrix x)
Adds a point x to this cluster. |
Matrix |
getCenter()
Returns the cluster center. |
double |
getDistanceFromCenter(Matrix x)
Returns the euclidian distance of a point x to the cluster center. |
Matrix |
getMeanOfElements()
Returns the mean of all the elements in this cluster. |
int |
getNumberOfElements()
Returns the number of elements in this cluster. |
Matrix |
getVarianceOfElements()
Returns the variance of all the elements in this cluster. |
void |
print()
Prints some information about this cluster. |
void |
reset(Matrix newCenter)
Resets all internal values of this cluster. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int N
protected Matrix center
Constructor Detail |
---|
public KMeansClustering.Cluster(Matrix mean)
mean
- Matrix the cluster center of this new cluster.Method Detail |
---|
public double getDistanceFromCenter(Matrix x)
x
- Matrix point in the n-dimensional space
public void add(Matrix x)
x
- Matrix o point in the n-dimensional spacepublic Matrix getMeanOfElements()
public Matrix getVarianceOfElements()
public void reset(Matrix newCenter)
newCenter
- Matrixpublic int getNumberOfElements()
public Matrix getCenter()
public void print()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |