bigrf icon indicating copy to clipboard operation
bigrf copied to clipboard

Issue with your example

Open t6166as opened this issue 8 years ago • 1 comments

When I tried to created second tree, I get following error:

forest2 <- bigrfc(x[1:60, ], y[1:60], ntree=50L, varselect=vars) Error in filebacked.big.matrix(nrow = nrow, ncol = ncol, type = type, : Backing file already exists! Either remove or specify different backing file

What is backing file?

t6166as avatar Feb 21 '17 00:02 t6166as

The backing file is a temporary file used to store data that won't fit in memory. There seems to be code to clear these files after fitting a tree (grow.R) but it for me it doesn't get called, and bigrf will complain if it finds a file there.

A workaround is to pass either random or different backing file directories for each forest, clearing them manually:

tmp.dir.forest1 <- '/tmp/Rforest1'
unlink(tmp.dir.forest1, recursive = TRUE)
forest1 <- bigrfc(x, y, cachepath=tmp.dir.forest1)

ajnisbet avatar Feb 21 '17 11:02 ajnisbet