Description Usage Arguments Value Examples
Creates a decision forest based on an input matrix.
1 2 3 4 |
X |
an n by d numeric matrix. The rows correspond to observations and columns correspond to features. |
trees |
the number of trees in the forest. (trees=100) |
min.parent |
the minimum splittable node size. A node size < min.parent will be a leaf node. (min.parent = round(nrow(X)^.5)) |
max.depth |
the longest allowable distance from the root of a tree to a leaf node (i.e. the maximum allowed height for a tree). If max.depth=NA, the tree will be allowed to grow without bound. (max.depth=NA) |
mtry |
the number of features to test at each node. (mtry=ceiling(ncol(X)^.5)) |
sparsity |
a real number in (0,1) that specifies the distribution of non-zero elements in the random matrix. (sparsity=1/nrow(X)) |
normalizeData |
a logical value that determines if input data is normalized to values ranging from 0 to 1 prior to processing. (normalizeData=TRUE) |
Progress |
boolean for printing progress. |
splitCrit |
split based on twomeans(splitCrit="twomeans") or BIC test(splitCrit="bicfast") |
LinearCombo |
logical that determines whether to use linear combination of features. (LinearCombo=TRUE). |
urerfStructure
1 2 3 4 5 6 7 | ### Train RerF on numeric data ###
library(rerf)
urerfStructure <- Urerf(as.matrix(iris[, 1:4]))
urerfStructure.bic <- Urerf(as.matrix(iris[, 1:4]), splitCrit = 'bicfast')
dissimilarityMatrix <- hclust(as.dist(1 - urerfStructure$similarityMatrix), method = "mcquitty")
clusters <- cutree(dissimilarityMatrix, k = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.