I'm trying to do a boosted regression tree with a dataset with abundance and environmental variables with the following code:
dados.tc3.lr003 <- gbm.step(data=Dados, gbm.x = 2:14, gbm.y = 1, family = "gaussian", tree.complexity = 3, learning.rate = 0.003, bag.fraction = 0.5)
But when I run the code, the following error apears:
Error in gbm.fit(x = x, y = y, offset = offset, distribution = distribution, : The data set is too small or the subsampling rate is too large: `nTrain * bag.fraction <= n.minobsinnode`
I'm not doing any subsampling, I'm using a full dataset with 46 observations.
I already tryed to reduce the bag.fraction, but the same error apeared.
Is there any way to decrease the subsampling rate or the data set is just too small to perform this analyse?
Thank you in advance!