SAMME.R implementation

better to write function "generate_mask(size, bagging)" outside the class