Description Usage Arguments Format Details Value Fields Methods Author(s) Examples
SuffStats is a class of R6. It has provide some important statistics(fields or functions) inside the element of every (leaf) node in an ORT object.
1 |
numClasses |
A nonnegative integer indicates how many classes when solve a classifation problem. Default 0 for regression. If numClasses > 0, then do classifation. |
R6Class object.
Note that SuffStats may only be seen in leaf nodes of an ORT tree. See details in description of each field or method.
Object of R6Class, Object of SuffStats.
node.nNumber of samples under current node. Default 0.
classifyTRUE for classification and FALSE for Regression.
node.countsIf classification, counts of each y value in current node.
node.sumSum of the y value in current node.
node.square.sumSum of the y's square in current node.
update(y)When a sample comes in current node, update ORT with the sample's y value.
y - The y value of a sample.
reset()Reset all fields to NULL. Currently not used.
isLeaf()TRUE if current node is a leaf node otherwise FALSE.
pred()Return the prediction of current leaf node. Will return an integer for classification or an numeric for regression.
impurity()Return the impurity of current node. Computed via information entropy.
Quan Gu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.