Currently, many codes implemented in different ensembles are redundant. For example, the outputs of voting, bagging, snapshot ensemble all take the average over predictions from base estimators, leading to high redundancy on their forward functions.
It would be much better to have them aggregated into a standalone module torchensemble.operation, which focuses on the operations on tensors. Besides, additional unit tests on this module would help to improve the robustness of the entire package.
Below is the list on operations needed to be refactored and included in torchensemble.operation:
Average in FusionClassifier and FusionRegressor
Average in VotingClassifier and VotingRegressor
Average in BaggingClassifier and BaggingRegressor
Summation in GradientBoostingClassifier and GradientBoostingRegressor. The multiplicative factor shrinkate_rate should also be considered
One-hot encoding in GradientBoostingClassifier
Computation on pseudo-residuals in GradientBoostingClassifier and GradientBoostingRegressor
Average in SnapshotEnsembleClassifier and SnapshotEnsembleRegressor
Average in AdversarialTrainingClassifier and AdversarialTrainingRegressor
It would be great to have this done before the 0.1.0 release @zzzzwj.
Currently, many codes implemented in different ensembles are redundant. For example, the outputs of
voting
,bagging
,snapshot ensemble
all take the average over predictions from base estimators, leading to high redundancy on theirforward
functions.It would be much better to have them aggregated into a standalone module
torchensemble.operation
, which focuses on the operations on tensors. Besides, additional unit tests on this module would help to improve the robustness of the entire package.Below is the list on operations needed to be refactored and included in
torchensemble.operation
:FusionClassifier
andFusionRegressor
VotingClassifier
andVotingRegressor
BaggingClassifier
andBaggingRegressor
GradientBoostingClassifier
andGradientBoostingRegressor
. The multiplicative factorshrinkate_rate
should also be consideredGradientBoostingClassifier
GradientBoostingClassifier
andGradientBoostingRegressor
SnapshotEnsembleClassifier
andSnapshotEnsembleRegressor
AdversarialTrainingClassifier
andAdversarialTrainingRegressor
It would be great to have this done before the 0.1.0 release @zzzzwj.