[R] error: data set is too small or the subsampling rate is too large

Neha gupta neh@@bo|ogn@90 @end|ng |rom gm@||@com
Wed Dec 30 22:58:28 CET 2020


Hi, I am using the hyperparameters tuning of GBM but it gives me the
following error: (For some other datasets, my code works, so the problem
would be the dataset size I guess).

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`

My data is:

structure(list(ID = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15), Language = c(1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1,
1, 1, 3), Hardware = c(1, 2, 3, 1, 2, 4, 4, 2, 1, 1, 1, 5, 6,
1, 1), Duration = c(17, 7, 15, 18, 13, 5, 5, 11, 14, 5, 13, 31,
20, 26, 14), KSLOC = c(253.6, 40.5, 450, 214.4, 449.9, 50, 43,
200, 289, 39, 254.2, 128.6, 161.4, 164.8, 60.2), AdjFP = c(1217.1,
507.3, 2306.8, 788.5, 1337.6, 421.3, 99.9, 993, 1592.9, 240,
1611, 789, 690.9, 1347.5, 1044.3), RAWFP = c(1010, 457, 2284,
881, 1583, 411, 97, 998, 1554, 250, 1603, 724, 705, 1375, 976
), EffortMM = c(287, 82.5, 1107.31, 86.9, 336.3, 84, 23.2, 130.3,
116, 72, 258.7, 230.7, 157, 246.9, 69.9)), row.names = c(NA,
15L), class = "data.frame")

	[[alternative HTML version deleted]]



More information about the R-help mailing list