Skip to content

Instantly share code, notes, and snippets.

View planetceres's full-sized avatar

Matt Shaffer planetceres

View GitHub Profile
@planetceres
planetceres / adaboost.py
Created September 24, 2016 00:00 — forked from tristanwietsma/adaboost.py
AdaBoost Python implementation of the AdaBoost (Adaptive Boosting) classification algorithm.
from __future__ import division
from numpy import *
class AdaBoost:
def __init__(self, training_set):
self.training_set = training_set
self.N = len(self.training_set)
self.weights = ones(self.N)/self.N
self.RULES = []