Description Usage Arguments Format Details Value Fields Methods Author(s) Examples
Elem is a class of R6. It is the element of a node in a Tree or ORT object, storing some important information of the node/Tree.
1 |
param |
A list which usually has names of |
splitInd |
A integer indicates which x variable is used to split on current node. Default NULL. |
splitVal |
A numeric indicates what value of the chosen x variable is used to split on current node. Means: |
numSamplesSeen |
A integer indicates how many samples have come in current node for updating the ORT tree. Default 0. |
R6Class
object.
See details in description of each field or method.
Object of R6Class
, Object of Node Element
.
x.rng
A data frame which indicates the range of every x variable in training data.
It must be a shape of n*2
which n is the number of x variables, i.e. x.dim
.
And the first collumn must be the minimal values of x and the second as maximum.
You can generate it via OnlineRandomForest::dataRange()
for convenience.
x.dim
Number of x variables.
tests
A list of SuffStats
. Candicate splits of current node.
numTests
A part of param
indicates the number of SuffStats
in tests
stats
A SuffStats
object. The real splits of current node.
toString()
Print elem itself or the split of condition on current node.
pred()
Return the prediction of current leaf node. Will return an integer for classification or an numeric for regression.
update(x, y)
When a sample comes in current node, update ORT with the sample's x variables and y value.
x - The x variables of a sample. Note it is an numeric vector other than a scalar.
y - The y value of a sample.
updateSplit(xvar.index, xvar.value)
Replace the fields splitInd and splitVal of current node with xvar.index and xvar.value.
Other functions, usually not used.
Quan Gu
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.