Mercurial > hg > tvii
annotate tests/test_dot.py @ 31:fa7a51df0d90
[logistic regression] test gradient descent
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 04 Sep 2017 12:37:45 -0700 |
parents | bb8b6b06ca83 |
children |
rev | line source |
---|---|
5
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
1 #!/usr/bin/env python |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
2 |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
3 """ |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
4 test dot product |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
5 """ |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
6 |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
7 import unittest |
7 | 8 from tvii.dot import dot |
5
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
9 |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
10 class TestDot(unittest.TestCase): |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
11 |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
12 def test_simple(self): |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
13 """simple dot product test""" |
7 | 14 |
15 a = [1, 2, 3] | |
16 b = [4, 5, 6] | |
17 expected = 32 | |
5
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
18 |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
19 if __name__ == '__main__': |
382ab19fb052
[test] stub test for dot product
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
20 unittest.main() |