Interface Clusterer
- All Known Subinterfaces:
DensityBasedClusterer
- All Known Implementing Classes:
AbstractClusterer, AbstractDensityBasedClusterer, CLOPE, Cobweb, DBSCAN, EM, FarthestFirst, FilteredClusterer, HierarchicalClusterer, MakeDensityBasedClusterer, OPTICS, RandomizableClusterer, RandomizableDensityBasedClusterer, RandomizableSingleClustererEnhancer, sIB, SimpleKMeans, SingleClustererEnhancer, XMeans
public interface Clusterer
Interface for clusterers. Clients will typically extend either
AbstractClusterer or AbstractDensityBasedClusterer.
- Author:
- Mark Hall (mhall@cs.waikato.ac.nz)
-
Method Summary
Modifier and TypeMethodDescriptionvoidbuildClusterer(Instances data) Generates a clusterer.intclusterInstance(Instance instance) Classifies a given instance.double[]distributionForInstance(Instance instance) Predicts the cluster memberships for a given instance.Returns the Capabilities of this clusterer.intReturns the number of clusters.
-
Method Details
-
buildClusterer
-
clusterInstance
Classifies a given instance. Either this or distributionForInstance() needs to be implemented by subclasses.- Parameters:
instance- the instance to be assigned to a cluster- Returns:
- the number of the assigned cluster as an integer
- Throws:
Exception- if instance could not be clustered successfully
-
distributionForInstance
Predicts the cluster memberships for a given instance. Either this or clusterInstance() needs to be implemented by subclasses.- Parameters:
instance- the instance to be assigned a cluster.- Returns:
- an array containing the estimated membership probabilities of the test instance in each cluster (this should sum to at most 1)
- Throws:
Exception- if distribution could not be computed successfully
-
numberOfClusters
-
getCapabilities
Capabilities getCapabilities()Returns the Capabilities of this clusterer. Derived classifiers have to override this method to enable capabilities.- Returns:
- the capabilities of this object
- See Also:
-