edu.indiana.util.clustering
Class KMedoidClustering
java.lang.Object
edu.indiana.util.clustering.AbstractClusterMethod
edu.indiana.util.clustering.KMedoidClustering
- All Implemented Interfaces:
- ClusterMethod
public class KMedoidClustering
- extends AbstractClusterMethod
Performs k-medoid clustering, as follows:
TD(class) = sum(dist(p, case), all cases)
TD = sum(TD(class), all classes)
choose k prototypes
assign remaining cases to nearest prototype
Label A
For each prototype p {
Find the non-prot n for which TD is smallest when n is a protoype instead of p
if the resulting TD is smaller than the TD without swapping {
make n a prot instead of p
reassign the other non-prots
}
}
If you made it all the way through the loop without changing any prototypes, you're done
otherwise goto A
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KMedoidClustering
public KMedoidClustering()
cluster
public Partition cluster(Partition partition)