InOutBags | R Documentation |
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
InOutBags(RF, data, k, inclRowNames = TRUE, NullRowNames = TRUE, verbose = 0)
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 |
inbag and outbag subsets of the original data
Markus Loecher <Markus.Loecher@gmail.com>
rfTit = rfTitanic(nRows = 200,nodesize=10, ntree = 5) k=1 tmp <- InOutBags(rfTit$RF, rfTit$data, k)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.