def EnsembleLearner(learners):
def train(dataset):<EOL><INDENT>predictors = [learner(dataset) for learner in learners]<EOL>def predict(example):<EOL><INDENT>return mode(predictor(example) for predictor in predictors)<EOL><DEDENT>return predict<EOL><DEDENT>return train<EOL>
Given a list of learning algorithms, have them vote.