InOutBags {rfVarImpOOB}R Documentation

separates data into inbag and outbag

Description

convenience function to mitigate risk of improperly disentangling train/test

NOTE: the original row names (too dangerous for repeated rows) are not kept but instead recorded in a separate column

Usage

InOutBags(RF, data, k, inclRowNames = TRUE, NullRowNames = TRUE, 


    verbose = 0)

Arguments

RF

object returned by call to randomForest()

data

data which was used to train the RF. NOTE: assumes setting of inbag=TRUE while training

k

tree number

inclRowNames

create extra column of original row names

NullRowNames

if TRUE set row names to NULL

verbose

level of verbosity

Value

inbag and outbag subsets of the original data

Author(s)

Markus Loecher <Markus.Loecher@gmail.com>

Examples



rfTit = rfTitanic(nRows = 200,nodesize=10, ntree = 5)





k=1


tmp <- InOutBags(rfTit$RF, rfTit$data, k)






[Package rfVarImpOOB version 1.0.3 Index]