Click or drag to resize
Accord.NET (logo)

DecisionNode Class

Decision Tree (DT) Node.
Inheritance Hierarchy
SystemObject
  Accord.MachineLearning.DecisionTreesDecisionNode

Namespace:  Accord.MachineLearning.DecisionTrees
Assembly:  Accord.MachineLearning (in Accord.MachineLearning.dll) Version: 3.8.0
Syntax
[SerializableAttribute]
public class DecisionNode : IEnumerable
Request Example View Source

The DecisionNode type exposes the following members.

Constructors
  NameDescription
Public methodDecisionNode
Creates a new decision node.
Top
Properties
  NameDescription
Public propertyBranches
If this is not a leaf node, gets or sets the collection of child nodes for this node, together with the attribute determining the reasoning process for those children.
Public propertyComparison
Gets or sets the type of the comparison which should be done against Value.
Public propertyIsLeaf
Gets a value indicating whether this instance is a leaf (has no children).
Public propertyIsRoot
Gets a value indicating whether this instance is a root node (has no parent).
Public propertyOutput
If this is a leaf node, gets or sets the output value to be decided when this node is reached.
Public propertyOwner
Gets the DecisionTree containing this node.
Public propertyParent
Gets or sets the parent of this node. If this is a root node, the parent is null.
Public propertyValue
Gets or sets the value this node responds to whenever this node acts as a child node. This value is set only when the node has a parent.
Top
Methods
  NameDescription
Public methodCompute(Double)
Computes whether a value satisfies the condition imposed by this node.
Public methodCompute(Int32)
Computes whether a value satisfies the condition imposed by this node.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through the node's subtree.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetHeight
Computes the height of the node, defined as the distance (in number of links) between the tree's root node and this node.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Public methodToString(Codification)
Returns a String that represents this instance.
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodSetEqualsDecisionNode
Compares two enumerables for set equality. Two enumerables are set equal if they contain the same elements, but not necessarily in the same order.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks
Each node of a decision tree can play two roles. When a node is not a leaf, it contains a DecisionBranchNodeCollection with a collection of child nodes. The branch specifies an attribute index, indicating which column from the data set (the attribute) should be compared against its children values. The type of the comparison is specified by each of the children. When a node is a leaf, it will contain the output value which should be decided for when the node is reached.
See Also