varsel_regression_rf: Variable Selection with Regression RF

Description Usage Arguments Examples

View source: R/varsel_regression_rf.R

Description

Similar approach to varSelRF, but for regresssion. Use full model to rank variables based on either imporatance = TRUE. It then steps through that sorted variable list with most important first and runs RF, store variables and Note: this sorts on Gini, by default. importance = TRUE ensures

Usage

1
varsel_regression_rf(y, x, prog = F, ...)

Arguments

y

response a vector

x

predictors a data.frame

...

options to pass to randomForest

Examples

1
2
3
4
5
6
data(LakeTrophicModelling)
predictors_all <- predictors_all[predictors_all!="DATE_COL"]
all_dat <- data.frame(ltmData[predictors_all],LogCHLA=log10(ltmData$CHLA))
all_dat <- all_dat[complete.cases(all_dat),]
x<-varsel_regression_rf(all_dat$LogCHLA,all_dat[,names(all_dat)!="LogCHLA"],
                        ntree=100,prog=T, importance = TRUE)

USEPA/LakeTrophicModelling documentation built on Oct. 15, 2020, 4:13 p.m.