zachmayer / caretEnsemble

caret models all the way down :turtle:
http://zachmayer.github.io/caretEnsemble/
Other
226 stars 75 forks source link

Major refactor of buildModels #56

Closed zachmayer closed 9 years ago

zachmayer commented 9 years ago

I did a lot of thinking about buildModels this weekend, and I think this new version is much more robust. The basic idea is the arguments are exactly the same as for caret::train, with the exception of an additional modelList and tuneList (we might think a little bit about the names of these arguments)

For example, a simple train model would be: m <- train(x, y, method="rf")

While a model_list would be: m <- train(x, y, methodList=c("rf", "glm", "gbm"))

I really like the new syntax. All test pass, and R CMD CHECK passes (though I had to update some old tests to use the new syntax. It also lets us pass parameters through train to the underlying models. I think buildModels is basically now the way all lists of caret models should be built: It's 100% as flexible as caret::train (it even supports formula interface models!)

Additionally, this PR closes the following issues:

55, #54, #53, #51, #50, #18

I'm very excited about this PR. @jknowles, let me know what you think!!

zachmayer commented 9 years ago

Now also takes care of #46

jknowles commented 9 years ago

Wow. I think you've really improved upon this. I'm going to give this a test run on a model application I maintain to see if it gives it any hiccups. But, I anticipate this makes it much clearer for users.

zachmayer commented 9 years ago

Thanks! Let me know how it works out! I'm going to go ahead with the name change too.

zachmayer commented 9 years ago

Name change done.

jknowles commented 9 years ago

OK -- this looks great to me!

zachmayer commented 9 years ago

Awesome! Merging!