@@ -0,0 +1,900 @@
+import profile%0Aimport numpy as np%0Aimport pandas as pd%0Afrom sklearn import preprocessing%0Afrom OnlineClassificationTree import *%0A%0Adef test():%0A    filename = %22dataset.csv%22%0A    df = pd.read_csv(filename, header = 0)%0A    data = df.values%0A    y = data%5B:, -1%5D%0A    lbl_enc = preprocessing.LabelEncoder()%0A    y = lbl_enc.fit_transform(y)%0A    data = data%5B:, 0:-1%5D%0A    train = data%5B0:50000%5D%0A    ytrain = y%5B0:50000%5D%0A    test = data%5B50000:%5D%0A    ytest = y%5B50000:%5D%0A    learner = ClassificationTree(number_of_features=93)%0A    %0A    for t, x in enumerate(train):%0A        learner.update(x, ytrain%5Bt%5D)%0A        if t %25 1000 == 0:%0A            print t%0A    correct_num = 0%0A    for t, x in enumerate(test):%0A        y_pred = learner.predict(x)%0A        if y_pred == ytest%5Bt%5D:%0A            correct_num += 1%0A        if t %25 1000 == 0:%0A            print t%0A%0A    print correct_num%0A%0Aif __name__ == '__main__':%0A    profile.run(%22test()%22)%0A

Create test.py