(N=1)
| 33 | |
| 34 | |
| 35 | def test_linear_kernel(N=1): |
| 36 | np.random.seed(12345) |
| 37 | i = 0 |
| 38 | while i < N: |
| 39 | N = np.random.randint(1, 100) |
| 40 | M = np.random.randint(1, 100) |
| 41 | C = np.random.randint(1, 1000) |
| 42 | |
| 43 | X = np.random.rand(N, C) |
| 44 | Y = np.random.rand(M, C) |
| 45 | |
| 46 | mine = LinearKernel()(X, Y) |
| 47 | gold = sk_linear(X, Y) |
| 48 | |
| 49 | np.testing.assert_almost_equal(mine, gold) |
| 50 | print("PASSED") |
| 51 | i += 1 |
| 52 | |
| 53 | |
| 54 | def test_polynomial_kernel(N=1): |
nothing calls this directly
no test coverage detected