It currently makes a LOT of copies of the input dataset, which can suck of huge amounts of RAM:
for (i in 1:length(modelLibrary)) {
out <- modelLibrary[[i]]
tune <- tunes[[i]]
for (name in names(tune)) {
indxLogic <- out[, name] == tune[, name]
indxLogic[is.na(indxLogic)] <- FALSE
out <- out[indxLogic, ]
}
out <- out[order(out$Resample, out$rowIndex), ]
newModels[[i]] <- out
}
I think a simple fix would be to use a data.table internally, which would save use from copies at every subset.
It currently makes a LOT of copies of the input dataset, which can suck of huge amounts of RAM:
I think a simple fix would be to use a
data.table
internally, which would save use from copies at every subset.