caretEnsemble icon indicating copy to clipboard operation
caretEnsemble copied to clipboard

Nested cross-validation

Open zachmayer opened this issue 10 years ago • 4 comments
trafficstars

It'd be nice to evaluate the ensemble on a separate test set than the one used to make the ensemble.

zachmayer avatar Dec 18 '14 16:12 zachmayer

:+1: Absolutely agree with this.

jknowles avatar Dec 18 '14 16:12 jknowles

I wrote a basic script a couple functions to do this a few weeks ago (rlesca01/caretNestedCV). Its pretty rough at the moment but it does work. Basically it just does a loop over a function which is very similar to caretList and returns a list of a list of models. There is then a function calculates the OOS performance of the individual models and then another function which returns the OOS of the ensembled models. The main.r script should just run as is with the example data. Obviously, if you're doing 10x CV on the outer loop than everything takes much longer.

rlesca01 avatar Dec 22 '14 20:12 rlesca01

@rlesca01 If you want to incorporate this into caretEnsemble, feel free to send a PR.

Otherwise, Jared or I will give it a shot soonish.

zachmayer avatar May 22 '15 16:05 zachmayer

Hi Zach, yeah I'll take a stab at this and send over a PR, mostly I need to add some tests to the code I have.

rlesca01 avatar May 22 '15 17:05 rlesca01