Skip to content

Instantly share code, notes, and snippets.

@curiousily
Created March 31, 2019 13:07
Show Gist options
  • Save curiousily/341500d5573aa3da1696ded70035fbd6 to your computer and use it in GitHub Desktop.
Save curiousily/341500d5573aa3da1696ded70035fbd6 to your computer and use it in GitHub Desktop.
class TestLogisticRegressor(unittest.TestCase):
def test_correct_prediction(self):
global X
global y
X = X.reshape(X.shape[0], 1)
clf = LogisticRegressor()
y_hat = clf.fit(X, y).predict(X)
self.assertTrue((y_hat == y).all())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment