Last active
March 31, 2019 12:23
-
-
Save curiousily/5def43b7aa02d616994030f61da4359f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestGradientDescent(unittest.TestCase): | |
def test_correct_prediction(self): | |
global X | |
global y | |
if len(X.shape) != 2: | |
X = X.reshape(X.shape[0], 1) | |
w = fit(X, y) | |
y_hat = predict(X, w).round() | |
self.assertTrue((y_hat == y).all()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment