程序包 weka.clusterers
接口 Clusterer
- 所有已知子接口:
DensityBasedClusterer
- 所有已知实现类:
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.
- 作者:
- Mark Hall (mhall@cs.waikato.ac.nz)
-
方法概要
修饰符和类型方法说明void
buildClusterer
(Instances data) Generates a clusterer.int
clusterInstance
(Instance instance) Classifies a given instance.double[]
distributionForInstance
(Instance instance) Predicts the cluster memberships for a given instance.Returns the Capabilities of this clusterer.int
Returns the number of clusters.
-
方法详细资料
-
buildClusterer
Generates a clusterer. Has to initialize all fields of the clusterer that are not being set via options.- 参数:
data
- set of instances serving as training data- 抛出:
Exception
- if the clusterer has not been generated successfully
-
clusterInstance
Classifies a given instance. Either this or distributionForInstance() needs to be implemented by subclasses.- 参数:
instance
- the instance to be assigned to a cluster- 返回:
- the number of the assigned cluster as an integer
- 抛出:
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.- 参数:
instance
- the instance to be assigned a cluster.- 返回:
- an array containing the estimated membership probabilities of the test instance in each cluster (this should sum to at most 1)
- 抛出:
Exception
- if distribution could not be computed successfully
-
numberOfClusters
Returns the number of clusters.- 返回:
- the number of clusters generated for a training dataset.
- 抛出:
Exception
- if number of clusters could not be returned successfully
-
getCapabilities
Capabilities getCapabilities()Returns the Capabilities of this clusterer. Derived classifiers have to override this method to enable capabilities.- 返回:
- the capabilities of this object
- 另请参阅:
-