|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectweka.clusterers.AbstractClusterer
weka.clusterers.RandomizableClusterer
mulan.classifier.meta.ConstrainedKMeans
public class ConstrainedKMeans
Cluster data using the constrained k means algorithm
RandomizableClusterer,
Serialized Form| Nested Class Summary | |
|---|---|
static class |
ConstrainedKMeans.bucketInstance
Class for representing an instance inside a bucket |
| Field Summary |
|---|
| Fields inherited from class weka.clusterers.RandomizableClusterer |
|---|
m_Seed, m_SeedDefault |
| Constructor Summary | |
|---|---|
ConstrainedKMeans()
the default constructor |
|
| Method Summary | |
|---|---|
void |
buildClusterer(Instances data)
Generates a clusterer. |
int |
clusterInstance(Instance instance)
Classifies a given instance. |
Capabilities |
getCapabilities()
Returns default capabilities of the clusterer. |
Instances |
getClusterCentroids()
Gets the the cluster centroids |
int[][][] |
getClusterNominalCounts()
Returns for each cluster the frequency counts for the values of each nominal attribute |
int[] |
getClusterSizes()
Gets the number of instances in each cluster |
Instances |
getClusterStandardDevs()
Gets the standard deviations of the numeric attributes in each cluster |
int |
getNumClusters()
gets the number of clusters to generate |
double |
getSquaredError()
Gets the squared error for all clusters |
String |
globalInfo()
Returns a string describing this clusterer |
Enumeration |
listOptions()
Returns an enumeration describing the available options. |
int |
numberOfClusters()
Returns the number of clusters. |
String |
numClustersTipText()
Returns the tip text for this property |
void |
setMaxIterations(int x)
|
void |
setNumClusters(int n)
set the number of clusters to generate |
String |
toString()
return a string describing this clusterer |
| Methods inherited from class weka.clusterers.RandomizableClusterer |
|---|
getOptions, getSeed, seedTipText, setOptions, setSeed |
| Methods inherited from class weka.clusterers.AbstractClusterer |
|---|
distributionForInstance, forName, getRevision, makeCopies, makeCopy, runClusterer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConstrainedKMeans()
| Method Detail |
|---|
public String globalInfo()
public Capabilities getCapabilities()
getCapabilities in interface ClusterergetCapabilities in interface CapabilitiesHandlergetCapabilities in class AbstractClustererpublic void setMaxIterations(int x)
x -
public void buildClusterer(Instances data)
throws Exception
buildClusterer in interface ClustererbuildClusterer in class AbstractClustererdata - set of instances serving as training data
Exception - if the clusterer has not been generated successfully
public int clusterInstance(Instance instance)
throws Exception
clusterInstance in interface ClustererclusterInstance in class AbstractClustererinstance - the instance to be assigned to a cluster
Exception - if instance could not be classified successfully
public int numberOfClusters()
throws Exception
numberOfClusters in interface ClusterernumberOfClusters in class AbstractClustererException - if number of clusters could not be returned
successfullypublic Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class RandomizableClustererpublic String numClustersTipText()
public void setNumClusters(int n)
throws Exception
setNumClusters in interface NumberOfClustersRequestablen - the number of clusters to generate
Exception - if number of clusters is negativepublic int getNumClusters()
public String toString()
toString in class Objectpublic Instances getClusterCentroids()
public Instances getClusterStandardDevs()
public int[][][] getClusterNominalCounts()
public double getSquaredError()
public int[] getClusterSizes()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||