diff learner.py @ 14:5ede27026e05

Working on gradient_based_learner
author bengioy@bengiomac.local
date Wed, 26 Mar 2008 22:56:13 -0400
parents 633453635d51
children 266c68cb6136
line wrap: on
line diff
--- a/learner.py	Wed Mar 26 21:38:08 2008 -0400
+++ b/learner.py	Wed Mar 26 22:56:13 2008 -0400
@@ -23,13 +23,15 @@
         """
         raise NotImplementedError
 
-    def update(self,training_set):
+    def update(self,training_set,train_stats_collector=None):
         """
         Continue training a learner, with the evidence provided by the given training set.
         Hence update can be called multiple times. This is particularly useful in the
         on-line setting or the sequential (Bayesian or not) settings.
         The result is a function that can be applied on data, with the same
         semantics of the Learner.use method.
+        The user may optionally provide a training StatsCollector that is used to record
+        some statistics of the outputs computed during training.
         """
         return self.use # default behavior is 'non-adaptive', i.e. update does not do anything