|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object weka.clusterers.AbstractClusterer weka.clusterers.RandomizableClusterer mulan.classifier.meta.ConstrainedKMeans
public class ConstrainedKMeans
Cluster data using the constrained k means algorithm
RandomizableClusterer
,
Serialized FormNested 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 Clusterer
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class AbstractClusterer
public void setMaxIterations(int x)
x
- public void buildClusterer(Instances data) throws Exception
buildClusterer
in interface Clusterer
buildClusterer
in class AbstractClusterer
data
- set of instances serving as training data
Exception
- if the clusterer has not been generated successfullypublic int clusterInstance(Instance instance) throws Exception
clusterInstance
in interface Clusterer
clusterInstance
in class AbstractClusterer
instance
- the instance to be assigned to a cluster
Exception
- if instance could not be classified successfullypublic int numberOfClusters() throws Exception
numberOfClusters
in interface Clusterer
numberOfClusters
in class AbstractClusterer
Exception
- if number of clusters could not be returned
successfullypublic Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class RandomizableClusterer
public String numClustersTipText()
public void setNumClusters(int n) throws Exception
setNumClusters
in interface NumberOfClustersRequestable
n
- the number of clusters to generate
Exception
- if number of clusters is negativepublic int getNumClusters()
public String toString()
toString
in class Object
public 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 |