# HG changeset patch # User James Bergstra # Date 1224782802 14400 # Node ID 69c800af13709e08bb525883e27aa591721854ad # Parent 45b3eb429c151860221c17d45bf9e226a08ac01d changed weight initialization for logistic regression diff -r 45b3eb429c15 -r 69c800af1370 algorithms/logistic_regression.py --- a/algorithms/logistic_regression.py Thu Oct 23 13:26:11 2008 -0400 +++ b/algorithms/logistic_regression.py Thu Oct 23 13:26:42 2008 -0400 @@ -10,11 +10,11 @@ class Module_Nclass(module.FancyModule): class __instance_type__(module.FancyModuleInstance): - def initialize(self, n_in, n_out, rng=N.random): + def initialize(self, n_in, n_out): #self.component is the LogisticRegressionTemplate instance that built this guy. - self.w = rng.randn(n_in, n_out) - self.b = rng.randn(n_out) + self.w = N.zeros((n_in, n_out)) + self.b = N.zeros(n_out) self.lr = 0.01 self.__hide__ = ['params']