ChanceNode {rdecision} | R Documentation |
A chance node in a decision tree
Description
An R6 class representing a chance node in a decision tree.
Details
A chance node is associated with at least two branches to other
nodes, each of which has a conditional probability (the probability of
following that branch given that the node has been reached). Inherits from
class Node
.
Super class
rdecision::Node
-> ChanceNode
Methods
Public methods
Inherited methods
Method new()
Create a new ChanceNode
object
Usage
ChanceNode$new(label = "")
Arguments
label
An optional label for the chance node.
Returns
A new ChanceNode
object
Method grob()
Creates a grid::grob for a chance node.
Usage
ChanceNode$grob(x, y, bb = FALSE)
Arguments
x
x coordinate of the node, grid::unit object.
y
y coordinate of the node, grid::unit object.
bb
Logical. If TRUE, function returns the bounding box.
Returns
A grob containing the symbol and label, or a bounding box as a grid::unit vector with elements: left, right, bottom, top.
Method clone()
The objects of this class are cloneable with this method.
Usage
ChanceNode$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Author(s)
Andrew Sims andrew.sims@newcastle.ac.uk