changeset 401:217c8789284b

Small updates
author Joseph Turian <turian@gmail.com>
date Wed, 09 Jul 2008 00:29:16 -0400
parents 269d5c5a4209
children ffdd2c199f2a
files sandbox/rbm/globals.py sandbox/rbm/model.py sparse_instance.py
diffstat 3 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/sandbox/rbm/globals.py	Tue Jul 08 23:59:57 2008 -0400
+++ b/sandbox/rbm/globals.py	Wed Jul 09 00:29:16 2008 -0400
@@ -4,7 +4,7 @@
 
 INPUT_DIMENSION = 1000
 #INPUT_DIMENSION = 100
-HIDDEN_DIMENSION = 10
+HIDDEN_DIMENSION = 100
 #HIDDEN_DIMENSION = 20
 #HIDDEN_DIMENSION = 6
 LEARNING_RATE = 0.1
--- a/sandbox/rbm/model.py	Tue Jul 08 23:59:57 2008 -0400
+++ b/sandbox/rbm/model.py	Wed Jul 09 00:29:16 2008 -0400
@@ -62,8 +62,7 @@
             q = sigmoid(self.parameters.b + dot(v, self.parameters.w))
             h = sample(q)
             p = sigmoid(self.parameters.c + dot(h, self.parameters.w.T))
-            v = sample(p)
-        return v
+        return p
 
     def update(self, instances):
         """
--- a/sparse_instance.py	Tue Jul 08 23:59:57 2008 -0400
+++ b/sparse_instance.py	Wed Jul 09 00:29:16 2008 -0400
@@ -12,8 +12,8 @@
     @type instances: list of sparse instances
     @param dimensions: The number of dimensions in each instance.
     @rtype: numpy matrix (instances x dimensions)
+    @todo: Allow this function to convert SINGLE instances (not lists).
     """
-    assert isinstance(instances, list)
     v = zeros((len(instances), dimensions))
     l = len(instances)
     for i in range(l):