public class FuzzyCMeansAlg extends Object
Constructor and Description |
---|
FuzzyCMeansAlg(DataHolder data)
Initialize Fuzzy C-means calculations
|
Modifier and Type | Method and Description |
---|---|
void |
delete()
Clear
|
int[] |
getAssignments()
Returns cluster assignments of all points.
|
DataHolder |
getCenters()
Returns cluster centers
|
int |
getClusters()
Get the number of clusters
|
double |
getCompactness()
This method returns the Compactness and Separation measure of cluster
validity (see Fuzzy Algorithms With Applications to Image Processing and
Pattern Recognition, Zheru Chi, Hong Yan, Tuan Pham, World Scientific,
pp.
|
int |
getError()
Get error code.
|
double[][] |
getMembeship()
Return cluster membership
|
String |
getName()
Get the description of the algorithm
|
int[] |
getNumberPoints()
Returns the number of points in each cluster.
|
double |
getPartitionCoefficient()
This method returns the Partition Coefficient measure of cluster validity
(see Fuzzy Algorithms With Applications to Image Processing and Pattern
Recognition, Zheru Chi, Hong Yan, Tuan Pham, World Scientific, pp.
|
double |
getPartitionEntropy()
This method returns the Partition Entropy measure of cluster validity
(see Fuzzy Algorithms With Applications to Image Processing and Pattern
Recognition, Zheru Chi, Hong Yan, Tuan Pham, World Scientific, pp.
|
long |
getPosition()
This method returns a measure of the progress of the algorithm.
|
long |
getSize()
This method returns the estimated size (steps) for this task.
|
boolean |
isFinished()
This method returns true if the clustering has finished.
|
void |
run()
Run classic Fuzzy C-Means clustering algorithm: Calculate the cluster
centers.
|
void |
runBest()
Runs for the best estimate
|
void |
setClusters(int N)
Set number of clusters for calculations.
|
void |
setOptions(int maxIterations,
double epsilon,
double fuzziness)
Set initial conditions for clustering.
|
void |
setProb(double probClusters)
Set probability of associations with each cluster.
|
public FuzzyCMeansAlg(DataHolder data)
d
- input datapublic void setClusters(int N)
numClusters
- Set the desired number of clusters.public int getClusters()
public double[][] getMembeship()
public void setOptions(int maxIterations, double epsilon, double fuzziness)
maxIterations
- the maximum number of iterations.fuzziness
- the fuzziness (a.k.a. the "m" value)epsilon
- a small value used to verify if clustering has converged.public void delete()
public void setProb(double probClusters)
probClusters
- probability association.public DataHolder getCenters()
public int[] getAssignments()
public int[] getNumberPoints()
public void runBest()
public void run()
public long getSize()
public long getPosition()
public boolean isFinished()
public double getPartitionCoefficient()
public double getPartitionEntropy()
public int getError()
public double getCompactness()
public String getName()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics