Package weka.classifiers.trees.ft
Class FTInnerNode
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.trees.lmt.LogisticBase
weka.classifiers.trees.ft.FTtree
weka.classifiers.trees.ft.FTInnerNode
- All Implemented Interfaces:
Serializable
,Cloneable
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
,WeightedInstancesHandler
Class for Functional Inner tree structure.
- Version:
- $Revision: 1.4 $
- Author:
- Jo\~{a}o Gama, Carlos Ferreira
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFTInnerNode
(boolean errorOnProbabilities, int numBoostingIterations, int minNumInstances, double weightTrimBeta, boolean useAIC) Constructor for Functional Inner tree node. -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildClassifier
(Instances data) Method for building a Functional Inner tree (only called for the root node).void
buildTree
(Instances data, SimpleLinearRegression[][] higherRegressions, double totalInstanceWeight, double higherNumParameters) Method for building the tree structure.double[]
distributionForInstance
(Instance instance) Returns the class probabilities for an instance given by the Functional tree.Returns the revision string.double
prune()
Prunes a tree using C4.5 pruning procedure.Methods inherited from class weka.classifiers.trees.ft.FTtree
assignIDs, assignLeafModelNumbers, cleanup, getConstError, getModelParameters, getNodes, getNodes, getNumInnerNodes, getNumLeaves, graph, hasModels, modelDistributionForInstance, modelsToString, numLeaves, numNodes, toString
Methods inherited from class weka.classifiers.trees.lmt.LogisticBase
getMaxIterations, getNumRegressions, getUseAIC, getUsedAttributes, getWeightTrimBeta, percentAttributesUsed, setHeuristicStop, setMaxIterations, setUseAIC, setWeightTrimBeta
Methods inherited from class weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getCapabilities, getDebug, getOptions, listOptions, makeCopies, makeCopy, setDebug, setOptions
-
Constructor Details
-
FTInnerNode
public FTInnerNode(boolean errorOnProbabilities, int numBoostingIterations, int minNumInstances, double weightTrimBeta, boolean useAIC) Constructor for Functional Inner tree node.- Parameters:
errorOnProbabilities
- Use error on probabilities for stopping criterion of LogitBoost?numBoostingIterations
- sets the numBoostingIterations parameterminNumInstances
- minimum number of instances at which a node is considered for splitting
-
-
Method Details
-
buildClassifier
Method for building a Functional Inner tree (only called for the root node). Grows an initial Functional Tree.- Specified by:
buildClassifier
in classFTtree
- Parameters:
data
- the data to train with- Throws:
Exception
- if something goes wrong
-
buildTree
public void buildTree(Instances data, SimpleLinearRegression[][] higherRegressions, double totalInstanceWeight, double higherNumParameters) throws Exception Method for building the tree structure. Builds a logistic model, splits the node and recursively builds tree for child nodes.- Specified by:
buildTree
in classFTtree
- Parameters:
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- Throws:
Exception
- if something goes wrong
-
prune
Prunes a tree using C4.5 pruning procedure. -
distributionForInstance
Returns the class probabilities for an instance given by the Functional tree.- Specified by:
distributionForInstance
in classFTtree
- Parameters:
instance
- the instance- Returns:
- the array of probabilities
- Throws:
Exception
- if distribution can't be computed successfully
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Overrides:
getRevision
in classFTtree
- Returns:
- the revision
-