Implement Adaboost algorithm