Urerf: Unsupervised RerF forest Generator

Description Usage Arguments Value Examples

View source: R/Urerf.R

Description

Creates a decision forest based on an input matrix.

Usage

1
2
3
4
Urerf(X, trees = 100, min.parent = round(nrow(X)^0.5),
  max.depth = NA, mtry = ceiling(ncol(X)^0.5), sparsity = 1/ncol(X),
  normalizeData = TRUE, Progress = TRUE, splitCrit = "twomeans",
  LinearCombo = TRUE)

Arguments

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).

Value

urerfStructure

Examples

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)

rerf documentation built on May 2, 2019, 8:16 a.m.

Related to Urerf in rerf...