steps towards logistic regression
| author |
Jeff Hammel <k0scist@gmail.com> |
| date |
Wed, 30 Aug 2017 17:05:03 -0700 |
| parents |
92a402736bcc |
| children |
14d65b83c299 |
| files |
tvii/dot.py tvii/logistic_regression.py |
| diffstat |
2 files changed, 13 insertions(+), 0 deletions(-)
[+]
|
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tvii/dot.py Wed Aug 30 17:05:03 2017 -0700
@@ -0,0 +1,8 @@
+"""
+dot product
+"""
+
+def dot(w, x):
+ """inner dot product"""
+
+ raise NotImplementedError('TODO')
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tvii/logistic_regression.py Wed Aug 30 17:05:03 2017 -0700
@@ -0,0 +1,5 @@
+"""
+z = w'x + b
+a = sigmoid(z)
+L(a,y) = -(y*log(a) + (1-y)*log(1-a))
+"""