TorchEnsemble-Community / Ensemble-Pytorch

A unified ensemble framework for PyTorch to improve the performance and robustness of your deep learning model.
https://ensemble-pytorch.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.08k stars 95 forks source link

Supporting bootstrap sampling as in sklearn #153

Open hmishfaq opened 1 year ago

hmishfaq commented 1 year ago

I am trying to convert a sklearn based code that uses sklearn.ensemble.BaggingRegressor and am wondering if Ensemble-pytorch can have bootstrap argument as sklearn has.

xuyxu commented 1 year ago

Hi @hmishfaq, could you further explain which argument do you want to use. Currently, the Bagging estimators in Ensemble-pytorch only use the sample data with replacement technique.

hmishfaq commented 1 year ago

Hi @xuyxu, I would like to use the argument bootstrap as described in the link above of sklearn.ensemble.BagginRegressor. However, it seems there is no analog of such argument in ensemble-pytorch.

bootstrap:bool, default=True
Whether samples are drawn with replacement. If False, sampling without replacement is performed.
xuyxu commented 1 year ago

This argument equals True in BaggingRegressor internally.