# Ensemble Techniques - Bagging | Subset size

I do have a question on ensemble techniques Baggging/Boosting. - What would be the subset size for Bagging?

like said in a previous answer, the exact subsample parameter value depends on your data.

But a usual starting parameter that gets you good results in general, and doesn't hurt the data distribution much is 0.9.

Taking out 10% of your data at each iteration or newly constructed tree, makes your model generalize a little better. You can try out different variations of the 0.9 and see the results.

Bagging describes predicting based on the average result ob multiple models you created training on random subsets of data.

For example in scikit you can configure your Bagging models with max_samples to tell him how many subsets to use. (see sklearn doc: https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.BaggingClassifier.html)

If you're asking how high it "should" be, the answer is depending on your total volume of training data.

• Thanks Philips, Do we have a rule of thumb for the same? – Sunil Oct 7 '19 at 9:28
• You mean a rule of thumb how many samples to use? – Philipp Oct 7 '19 at 9:35
• Yes, the rule of thumb for how many samples to use. Also, it would be great to know, what happens if we do not use the parameter max_samples – Sunil Oct 8 '19 at 4:11
• the default for max_samples is 1 (check the documentation I attached as example). This means that the subset will have a size of "1" which basically means you do no bagging. As rule of thumb you can use a sample size the same size as the size of your training data. – Philipp Oct 8 '19 at 14:31