viisar / brew

⛔️ DEPRECATED brew: Python Ensemble Learning API
MIT License
301 stars 70 forks source link

Fixed the 'too many indices for array' for 'labels' mode in EnsembleStack #30

Closed omdv closed 7 years ago

omdv commented 7 years ago

When trying to use EnsembleStack with mode="labels" I got the "too many indices for an array" error in stacker.py. The reason is that as per the comment in Ensemble.output() method the output matrix is 2d for mode='labels' and 3d for 'probs' and 'votes'. I added the conditional assignment based on the self.method in EnsembleStack.

omdv commented 7 years ago

It actually also affects prediction in Combiner.combine() as it uses the 3d assignment. Fixing it as well, will re-open once done.