类 FTtree
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.trees.lmt.LogisticBase
weka.classifiers.trees.ft.FTtree
- 所有已实现的接口:
Serializable
,Cloneable
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
,WeightedInstancesHandler
- 直接已知子类:
FTInnerNode
,FTLeavesNode
,FTNode
Abstract class for Functional tree structure.
- 版本:
- $Revision: 1.4 $
- 作者:
- Jo\~{a}o Gama, Carlos Ferreira
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明int
assignIDs
(int lastID) Assigns unique IDs to all nodes in the treeint
assignLeafModelNumbers
(int leafCounter) Assigns numbers to the logistic regression models at the leaves of the treeabstract void
buildClassifier
(Instances data) Method for building a Functional Tree (only called for the root node).abstract void
buildTree
(Instances data, SimpleLinearRegression[][] higherRegressions, double totalInstanceWeight, double higherNumParameters) Abstract method for building the tree structure.void
cleanup()
Cleanup in order to save memory.abstract double[]
distributionForInstance
(Instance instance) Returns the class probabilities for an instance given by the Functional tree.int
getConstError
(double[] probsConst) Returns a string describing the number of LogitBoost iterations performed at this node, the total number of LogitBoost iterations performed (including iterations at higher levels in the tree), and the number of training examples at this node.getNodes()
Return a list of all inner nodes in the treevoid
Fills a list with all inner nodes in the treeint
Method to count the number of inner nodes in the treeint
Returns the number of leaves in the tree.Returns the revision string.graph()
Returns graph describing the tree.boolean
Returns true if the logistic regression model at this node has changed compared to the one at the parent node.double[]
modelDistributionForInstance
(Instance instance) Returns the class probabilities for an instance according to the logistic model at the node.Returns a string describing the logistic regression function at the node.int
Returns the number of leaves (normal count).int
numNodes()
Returns the number of nodes.abstract double
prune()
Abstract Method that prunes a tree using C4.5 pruning procedure.toString()
Returns a description of the Functional tree (tree structure and logistic models)从类继承的方法 weka.classifiers.trees.lmt.LogisticBase
getMaxIterations, getNumRegressions, getUseAIC, getUsedAttributes, getWeightTrimBeta, percentAttributesUsed, setHeuristicStop, setMaxIterations, setUseAIC, setWeightTrimBeta
从类继承的方法 weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getCapabilities, getDebug, getOptions, listOptions, makeCopies, makeCopy, setDebug, setOptions
-
构造器详细资料
-
FTtree
public FTtree()
-
-
方法详细资料
-
buildClassifier
Method for building a Functional Tree (only called for the root node). Grows an initial Functional Tree.- 覆盖:
buildClassifier
在类中LogisticBase
- 参数:
data
- the data to train with- 抛出:
Exception
- if something goes wrong
-
buildTree
public abstract void buildTree(Instances data, SimpleLinearRegression[][] higherRegressions, double totalInstanceWeight, double higherNumParameters) throws Exception Abstract method for building the tree structure. Builds a logistic model, splits the node and recursively builds tree for child nodes.- 参数:
data
- the training data passed on to this nodehigherRegressions
- An array of regression functions produced by LogitBoost at higher levels in the tree. They represent a logistic regression model that is refined locally at this node.totalInstanceWeight
- the total number of training exampleshigherNumParameters
- effective number of parameters in the logistic regression model built in parent nodes- 抛出:
Exception
- if something goes wrong
-
prune
Abstract Method that prunes a tree using C4.5 pruning procedure.- 抛出:
Exception
- if something goes wrong
-
getNumInnerNodes
public int getNumInnerNodes()Method to count the number of inner nodes in the tree- 返回:
- the number of inner nodes
-
getNumLeaves
public int getNumLeaves()Returns the number of leaves in the tree. Leaves are only counted if their logistic model has changed compared to the one of the parent node.- 返回:
- the number of leaves
-
getNodes
Return a list of all inner nodes in the tree- 返回:
- the list of nodes
-
getNodes
Fills a list with all inner nodes in the tree- 参数:
nodeList
- the list to be filled
-
getConstError
public int getConstError(double[] probsConst) - 类型参数:
any
- probsConst
-
hasModels
public boolean hasModels()Returns true if the logistic regression model at this node has changed compared to the one at the parent node.- 返回:
- whether it has changed
-
modelDistributionForInstance
Returns the class probabilities for an instance according to the logistic model at the node.- 参数:
instance
- the instance- 返回:
- the array of probabilities
- 抛出:
Exception
-
distributionForInstance
Returns the class probabilities for an instance given by the Functional tree.- 覆盖:
distributionForInstance
在类中LogisticBase
- 参数:
instance
- the instance- 返回:
- the array of probabilities
- 抛出:
Exception
- if distribution can't be computed successfully
-
toString
Returns a description of the Functional tree (tree structure and logistic models)- 覆盖:
toString
在类中LogisticBase
- 返回:
- describing string
-
numLeaves
public int numLeaves()Returns the number of leaves (normal count).- 返回:
- the number of leaves
-
numNodes
public int numNodes()Returns the number of nodes.- 返回:
- the number of nodes
-
getModelParameters
Returns a string describing the number of LogitBoost iterations performed at this node, the total number of LogitBoost iterations performed (including iterations at higher levels in the tree), and the number of training examples at this node.- 返回:
- the describing string
-
assignIDs
public int assignIDs(int lastID) Assigns unique IDs to all nodes in the tree -
assignLeafModelNumbers
public int assignLeafModelNumbers(int leafCounter) Assigns numbers to the logistic regression models at the leaves of the tree -
modelsToString
Returns a string describing the logistic regression function at the node. -
graph
Returns graph describing the tree.- 抛出:
Exception
- if something goes wrong
-
cleanup
public void cleanup()Cleanup in order to save memory.- 覆盖:
cleanup
在类中LogisticBase
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中LogisticBase
- 返回:
- the revision
-