类 C45PruneableClassifierTreeG
java.lang.Object
weka.classifiers.trees.j48.ClassifierTree
weka.classifiers.trees.j48.C45PruneableClassifierTreeG
- 所有已实现的接口:
Serializable
,CapabilitiesHandler
,Drawable
,RevisionHandler
Class for handling a tree structure that can
be pruned using C4.5 procedures and have nodes grafted on.
- 版本:
- $Revision: 5535 $
- 作者:
- Janice Boughton (based on code by Eibe Frank)
- 另请参阅:
-
字段概要
从接口继承的字段 weka.core.Drawable
BayesNet, Newick, NOT_DRAWABLE, TREE
-
构造器概要
构造器构造器说明C45PruneableClassifierTreeG
(ModelSelection toSelectLocModel, boolean pruneTree, float cf, boolean raiseTree, boolean relabel, boolean cleanup) Constructor for pruneable tree structure.C45PruneableClassifierTreeG
(ModelSelection toSelectLocModel, Instances data, ClassifierSplitModel gs, boolean prune, float cf, boolean raise, boolean isLeaf, boolean relabel, boolean cleanup) Constructor for pruneable tree structure. -
方法概要
修饰符和类型方法说明double
biprob
(double x, double n, double r) Significance testvoid
buildClassifier
(Instances data) Method for building a pruneable classifier tree.final void
collapse()
Collapses a tree to a node if training error doesn't increase.void
doGrafting
(Instances data) Initializes variables for grafting.Returns default capabilities of the classifier tree.Returns the revision string.void
prune()
Prunes a tree using C4.5's pruning procedure.void
setDescendents
(ArrayList t, C45PruneableClassifierTreeG originalLeaf) add the grafted nodes at originalLeaf's position in tree.toString()
Prints tree structure.从类继承的方法 weka.classifiers.trees.j48.ClassifierTree
assignIDs, buildTree, buildTree, classifyInstance, cleanup, distributionForInstance, graph, graphType, numLeaves, numNodes, prefix, toSource
-
构造器详细资料
-
C45PruneableClassifierTreeG
public C45PruneableClassifierTreeG(ModelSelection toSelectLocModel, boolean pruneTree, float cf, boolean raiseTree, boolean relabel, boolean cleanup) throws Exception Constructor for pruneable tree structure. Stores reference to associated training data at each node.- 参数:
toSelectLocModel
- selection method for local splitting modelpruneTree
- true if the tree is to be prunedcf
- the confidence factor for pruningraiseTree
-cleanup
-- 抛出:
Exception
- if something goes wrong
-
C45PruneableClassifierTreeG
public C45PruneableClassifierTreeG(ModelSelection toSelectLocModel, Instances data, ClassifierSplitModel gs, boolean prune, float cf, boolean raise, boolean isLeaf, boolean relabel, boolean cleanup) Constructor for pruneable tree structure. Used to create new nodes in the tree during grafting.- 参数:
toSelectLocModel
- selection method for local splitting modeldata
- the dta used to produce split modelgs
- the split modelprune
- true if the tree is to be prunedcf
- the confidence factor for pruningraise
-isLeaf
- if this node is a leaf or notrelabel
- whether relabeling occuredcleanup
-- 抛出:
Exception
- if something goes wrong
-
-
方法详细资料
-
getCapabilities
Returns default capabilities of the classifier tree.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中ClassifierTree
- 返回:
- the capabilities of this classifier tree
- 另请参阅:
-
buildClassifier
Method for building a pruneable classifier tree.- 覆盖:
buildClassifier
在类中ClassifierTree
- 参数:
datathe
- data for building the tree- 抛出:
Exception
- if something goes wrong
-
collapse
public final void collapse()Collapses a tree to a node if training error doesn't increase. -
prune
Prunes a tree using C4.5's pruning procedure.- 抛出:
Exception
- if something goes wrong
-
doGrafting
Initializes variables for grafting. sets up limits array (for numeric attributes) and calls the recursive function traverseTree.- 参数:
data
- the data for the tree- 抛出:
Exception
- if anything goes wrong
-
setDescendents
add the grafted nodes at originalLeaf's position in tree. a recursive function that terminates when t is empty.- 参数:
t
- the list of nodes to graftoriginalLeaf
- the leaf that the grafts are replacing
-
biprob
Significance test- 参数:
double
- x, double n, double r.- 返回:
- returns the probability of obtaining x or MORE out of n if r proportion of n are positive. z for normal estimation of binomial probability of obtaining x or more out of n, if r proportion of n are positive
- 抛出:
Exception
-
toString
Prints tree structure.- 覆盖:
toString
在类中ClassifierTree
- 返回:
- the tree structure
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中ClassifierTree
- 返回:
- the revision
-