changeset 502:17945defd813

Bug fix
author Joseph Turian <turian@gmail.com>
date Wed, 29 Oct 2008 02:08:56 -0400
parents 4fb6f7320518
children c7ce66b4e8f4
files algorithms/logistic_regression.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/algorithms/logistic_regression.py	Tue Oct 28 13:54:01 2008 -0400
+++ b/algorithms/logistic_regression.py	Wed Oct 29 02:08:56 2008 -0400
@@ -71,7 +71,7 @@
 
         self.params = [p for p in [self.w, self.b] if p.owner is None]
 
-        output = nnet.sigmoid(T.dot(self.x, self.w))
+        output = nnet.sigmoid(T.dot(self.x, self.w) + self.b)
         xent = -self.targ * T.log(output) - (1.0 - self.targ) * T.log(1.0 - output)
         sum_xent = T.sum(xent)