subRF: Grows Random Forests with Subset of Features

Description Usage Arguments Value Author(s) References Examples

View source: R/HIH.R

Description

This function grows Random Forests with subset of features. Features are selected according to a probability vector.

Usage

1
2
3
4
subRF(formula, data, w0,
subvars = function(data){ceiling((ncol(data)-1)/5)},
n.RF = 5,
wtRF = T)

Arguments

formula

A symbolic description of the model to be fit.

data

Data frame containing the y-outcome and x-variables.

w0

A probability vector, according to which features are selected.

subvars

Number of variables selected for fitting each random forest.

n.RF

Number of random forests to grow.

wtRF

logical. Should weighted random forests grown?

Value

A list of each random forest's output:

subdata

Dataframe used for growing the ith random forest.

pmd

PMD matrix from the ith random forest.

subRF.o

An object of class (rfsrc, grow) of the ith random forest.

Author(s)

Yifan Sha and Min Lu

References

Ishwaran H. (2007). Variable importance in binary regression trees and forests, Electronic J. Statist., 1:519-537.

Ishwaran H., Kogalur U.B., Gorodeski E.Z, Minn A.J. and Lauer M.S. (2010). High-dimensional variable selection for survival data. J. Amer. Statist. Assoc., 105:205-217.

Ishwaran H., Kogalur U.B., Chen X. and Minn A.J. (2011). Random survival forests for high-dimensional data. Statist. Anal. Data Mining, 4:115-132.

Examples

1
2
3
4
5
6
7
8
9
data(express)
o.0 <- rfsrc(y~., data = express[,1:11])
w.0 <- vimp(o.0,o.0$xvar.names,importance = "permute")
o <- subRF(y~., data = express[,1:11],
           w0 = w.0$importance,
           subvars = function(data){ceiling((ncol(data)-1)/5)},
           n.RF = 5,
           wtRF = TRUE)
o[[2]]

yifansha/highinthunt documentation built on July 2, 2020, 6:29 p.m.