rfcv: rfcv

Description Usage Arguments Author(s) References

View source: R/rfcv.R

Description

This function shows the cross-validated prediction performance of models with sequentially reduced number of predictors (ranked by variable importance) via a nested cross-validation procedure.

Usage

1
rfcv(trainx, trainy, cv.fold=5, scale="log", step=0.5, mtry=function(p) max(1, floor(sqrt(p))), recursive=FALSE, ...)

Arguments

trainx,

matrix or data frame containing columns of predictor variables

trainoffset,

vector of offset, must have length equal to the number of rows in trainx

trainy,

vector of response, must have length equal to the number of rows in trainx

cv.fold,

number of folds in the cross-validation

scale,

if "log", reduce a fixed proportion (step) of variables at each step, otherwise reduce step variables at a time

step,

if log=TRUE, the fraction of variables to remove at each step, else remove this many variables at a time

mtry,

a function of number of remaining predictor variables to use as the mtry parameter in the rfPoisson call

recursive,

whether variable importance is (re-)assessed at each step of variable reduction

...,

other arguments passed on to rfPoisson

Author(s)

Andy Liaw

References

Svetnik, V., Liaw, A., Tong, C. and Wang, T., “Application of Breiman's Random Forest to Modeling Structure-Activity Relationships of Pharmaceutical Molecules”, MCS 2004, Roli, F. and Windeatt, T. (Eds.) pp. 334-343.


fpechon/rfCountData documentation built on Aug. 12, 2019, 11:16 a.m.