def test_part3_1(): """ Test from part2 should be working """ X,Y = get_exam_dataset() X,Y = normalize_data(X,Y) log_reg = MulticlassLogisitcRegression(classes = 2) log_reg.fit(X,Y) accuracy = evaluate(log_reg, X, Y) print "Accuracy ",accuracy assert(accuracy > 0.8)
def test_part2(): """ Should be working after implementing succesfully part 2 """ X,Y = get_exam_dataset() X,Y = normalize_data(X,Y) log_reg = LogisticRegression(cls=1) log_reg.fit(X,Y) accuracy = evaluate(log_reg, X, Y) plot_exam_data_decision_boundary(X,Y,log_reg, 1) assert(accuracy > 0.8)