Closed sparcycram closed 8 years ago
On a previous question, I asked you to make a minimal, reproducible example. Here is the minimal reproducible example for your problem:
data.frame(
interaction.depth=seq(1,5, by=1),n.trees=seq(10,300, by=5),
shrinkage=0.1, n.minobsinnode = 10)
Given this minimal example, can you figure out where you went wrong?
It appears as though length of n.trees has to match length of interaction.depth so the settings have to reconcile. A bit difficult to do in ones head:) Thanks
Yup! expand.grid
is a really useful function in this situation, because it generates all possible combinations of the inputs, .e.g.
expand.grid(
interaction.depth=seq(1,5, by=1),n.trees=seq(10,300, by=5),
shrinkage=0.1, n.minobsinnode = 10)
But watch out! This can get big fast!
Thanks useful
Sent from my iPad
On 02 Apr 2016, at 00:24, Zach Mayer notifications@github.com wrote:
Yup! expand.grid is a really useful function in this situation, because it generates all possible combinations of the inputs, .e.g.
expand.grid( interaction.depth=seq(1,5, by=1),n.trees=seq(10,300, by=5), shrinkage=0.1, n.minobsinnode = 10) But watch out! This can get big fast!
— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub
Depending on the settings in gbm1 the error appears, n.trees by = 5 doesn't work by = 10 does?