Ensemble methods : foundations and algorithms