|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.georgetown.gucs.clustering.ClusterPruner
public class ClusterPruner
Cluster pruner.
Field Summary | |
---|---|
protected CosineSimilarityFingerprintMatcher |
distanceFunction
the distance function used. |
Constructor Summary | |
---|---|
ClusterPruner()
Default constructor. |
Method Summary | |
---|---|
void |
buildClusterer(byte[][] instances)
Builds this leader clusterer using the specified instances. |
int |
clusterInstance(byte[] instance)
Clusters the specified instance. |
int[] |
getAssignments()
|
int |
getK()
|
int |
getNumberOfFollowers()
|
int |
getNumClusters()
Gets the number of clusters |
static void |
main(java.lang.String[] args)
Main method for testing this class. |
int |
numberOfClusters()
Returns the number of clusters. |
void |
setK(int k)
|
void |
setPreserveInstancesOrder(boolean r)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected CosineSimilarityFingerprintMatcher distanceFunction
Constructor Detail |
---|
public ClusterPruner()
Method Detail |
---|
public void buildClusterer(byte[][] instances) throws java.lang.Exception
instances
- the instances to cluster
java.lang.Exception
- if the clusterer has not been
generated successfullypublic int clusterInstance(byte[] instance) throws java.lang.Exception
instance
- the instance to be assigned to a cluster
java.lang.Exception
- if instance could not be clusteredpublic int numberOfClusters() throws java.lang.Exception
java.lang.Exception
- if number of clusters could not be returned
successfullypublic int getNumClusters()
public int getNumberOfFollowers()
public void setK(int k) throws java.lang.Exception
java.lang.Exception
public int getK()
public void setPreserveInstancesOrder(boolean r)
public int[] getAssignments()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
args
- should contain the following arguments: -t training file [-N number of clusters]
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |