InOutBags: separates data into inbag and outbag

Description Usage Arguments Value Author(s) Examples

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

1
2
3
4
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
rfTit = rfTitanic(nRows = 200,nodesize=10, ntree = 5)





k=1


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

markusloecher/rfVarImpOOB documentation built on July 5, 2020, 6:50 p.m.