程序包 weka.clusterers
类 HierarchicalClusterer
java.lang.Object
weka.clusterers.AbstractClusterer
weka.clusterers.HierarchicalClusterer
- 所有已实现的接口:
Serializable
,Cloneable
,Clusterer
,CapabilitiesHandler
,Drawable
,OptionHandler
,RevisionHandler
public class HierarchicalClusterer
extends AbstractClusterer
implements OptionHandler, CapabilitiesHandler, Drawable
Hierarchical clustering class.
Implements a number of classic hierarchical clustering methods.
Valid options are:
-N number of clusters
-L Link type (Single, Complete, Average, Mean, Centroid, Ward, Adjusted complete, Neighbor Joining) [SINGLE|COMPLETE|AVERAGE|MEAN|CENTROID|WARD|ADJCOMLPETE|NEIGHBOR_JOINING]
-A Distance function to use. (default: weka.core.EuclideanDistance)
-P Print hierarchy in Newick format, which can be used for display in other programs.
-D If set, classifier is run in debug mode and may output additional info to the console.
-B \If set, distance is interpreted as branch length, otherwise it is node height.
- 版本:
- $Revision: 11330 $
- 作者:
- Remco Bouckaert (rrb@xm.co.nz, remco@cs.waikato.ac.nz), Eibe Frank (eibe@cs.waikato.ac.nz)
- 另请参阅:
-
字段概要
字段从接口继承的字段 weka.core.Drawable
BayesNet, Newick, NOT_DRAWABLE, TREE
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClusterer
(Instances data) Generates a clusterer.int
clusterInstance
(Instance instance) Classifies a given instance.Returns the tip text for this propertydouble[]
distributionForInstance
(Instance instance) Predicts the cluster memberships for a given instance.Returns the Capabilities of this clusterer.boolean
getDebug()
Get whether debugging is turned on.boolean
int
String[]
Gets the current settings of the clusterer.boolean
Returns the revision string.This will return a string describing the clusterer.graph()
Returns a string that describes a graph representing the object.int
Returns the type of graph representing the object.Returns an enumeration describing the available options.static void
int
Returns the number of clusters.void
setDebug
(boolean debug) Set debugging mode.void
setDistanceFunction
(DistanceFunction distanceFunction) void
setDistanceIsBranchLength
(boolean bDistanceIsHeight) void
setLinkType
(SelectedTag newLinkType) void
setNumClusters
(int nClusters) void
setOptions
(String[] options) Parses a given list of options.void
setPrintNewick
(boolean bPrintNewick) toString()
从类继承的方法 weka.clusterers.AbstractClusterer
forName, makeCopies, makeCopy
-
字段详细资料
-
TAGS_LINK_TYPE
-
-
构造器详细资料
-
HierarchicalClusterer
public HierarchicalClusterer()
-
-
方法详细资料
-
setNumClusters
public void setNumClusters(int nClusters) -
getNumClusters
public int getNumClusters() -
getDistanceFunction
-
setDistanceFunction
-
getPrintNewick
public boolean getPrintNewick() -
setPrintNewick
public void setPrintNewick(boolean bPrintNewick) -
setLinkType
-
getLinkType
-
buildClusterer
从类复制的说明:AbstractClusterer
Generates a clusterer. Has to initialize all fields of the clusterer that are not being set via options.- 指定者:
buildClusterer
在接口中Clusterer
- 指定者:
buildClusterer
在类中AbstractClusterer
- 参数:
data
- set of instances serving as training data- 抛出:
Exception
- if the clusterer has not been generated successfully
-
clusterInstance
从类复制的说明:AbstractClusterer
Classifies a given instance. Either this or distributionForInstance() needs to be implemented by subclasses.- 指定者:
clusterInstance
在接口中Clusterer
- 覆盖:
clusterInstance
在类中AbstractClusterer
- 参数:
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
从类复制的说明:AbstractClusterer
Predicts the cluster memberships for a given instance. Either this or clusterInstance() needs to be implemented by subclasses.- 指定者:
distributionForInstance
在接口中Clusterer
- 覆盖:
distributionForInstance
在类中AbstractClusterer
- 参数:
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
-
getCapabilities
从类复制的说明:AbstractClusterer
Returns the Capabilities of this clusterer. Derived classifiers have to override this method to enable capabilities.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 指定者:
getCapabilities
在接口中Clusterer
- 覆盖:
getCapabilities
在类中AbstractClusterer
- 返回:
- the capabilities of this object
- 另请参阅:
-
numberOfClusters
从类复制的说明:AbstractClusterer
Returns the number of clusters.- 指定者:
numberOfClusters
在接口中Clusterer
- 指定者:
numberOfClusters
在类中AbstractClusterer
- 返回:
- the number of clusters generated for a training dataset.
- 抛出:
Exception
- if number of clusters could not be returned successfully
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. Valid options are:- 指定者:
setOptions
在接口中OptionHandler
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the clusterer.- 指定者:
getOptions
在接口中OptionHandler
- 返回:
- an array of strings suitable for passing to setOptions()
-
toString
-
setDebug
public void setDebug(boolean debug) Set debugging mode.- 参数:
debug
- true if debug output should be printed
-
getDebug
public boolean getDebug()Get whether debugging is turned on.- 返回:
- true if debugging output is on
-
getDistanceIsBranchLength
public boolean getDistanceIsBranchLength() -
setDistanceIsBranchLength
public void setDistanceIsBranchLength(boolean bDistanceIsHeight) -
distanceIsBranchLengthTipText
-
debugTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
numClustersTipText
- 返回:
- a string to describe the NumClusters
-
printNewickTipText
- 返回:
- a string to describe the print Newick flag
-
distanceFunctionTipText
- 返回:
- a string to describe the distance function
-
linkTypeTipText
- 返回:
- a string to describe the Link type
-
globalInfo
This will return a string describing the clusterer.- 返回:
- The string.
-
main
-
graph
从接口复制的说明:Drawable
Returns a string that describes a graph representing the object. The string should be in XMLBIF ver. 0.3 format if the graph is a BayesNet, otherwise it should be in dotty format. -
graphType
public int graphType()从接口复制的说明:Drawable
Returns the type of graph representing the object. -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中AbstractClusterer
- 返回:
- the revision
-