comparison learner.py @ 75:90e4c0784d6e

Added draft of LinearRegression learner
author bengioy@bengiomac.local
date Sat, 03 May 2008 21:59:26 -0400
parents 266c68cb6136
children 1e2bb5bad636
comparison
equal deleted inserted replaced
73:69f97aad3faf 75:90e4c0784d6e
28 Continue training a learner, with the evidence provided by the given training set. 28 Continue training a learner, with the evidence provided by the given training set.
29 Hence update can be called multiple times. This is particularly useful in the 29 Hence update can be called multiple times. This is particularly useful in the
30 on-line setting or the sequential (Bayesian or not) settings. 30 on-line setting or the sequential (Bayesian or not) settings.
31 The result is a function that can be applied on data, with the same 31 The result is a function that can be applied on data, with the same
32 semantics of the Learner.use method. 32 semantics of the Learner.use method.
33
33 The user may optionally provide a training StatsCollector that is used to record 34 The user may optionally provide a training StatsCollector that is used to record
34 some statistics of the outputs computed during training. 35 some statistics of the outputs computed during training. It is update(d) during
36 training.
35 """ 37 """
36 return self.use # default behavior is 'non-adaptive', i.e. update does not do anything 38 return self.use # default behavior is 'non-adaptive', i.e. update does not do anything
37 39
38 40
39 def __call__(self,training_set,train_stats_collector=None): 41 def __call__(self,training_set,train_stats_collector=None):
49 be used with one or more calls to 'use'. The argument is a DataSet (possibly 51 be used with one or more calls to 'use'. The argument is a DataSet (possibly
50 containing a single example) and the result is a DataSet of the same length. 52 containing a single example) and the result is a DataSet of the same length.
51 If output_fields is specified, it may be use to indicate which fields should 53 If output_fields is specified, it may be use to indicate which fields should
52 be constructed in the output DataSet (for example ['output','classification_error']). 54 be constructed in the output DataSet (for example ['output','classification_error']).
53 Optionally, if copy_inputs, the input fields (of the input_dataset) can be made 55 Optionally, if copy_inputs, the input fields (of the input_dataset) can be made
54 visible in the output DataSet returned by this function. 56 visible in the output DataSet returned by this method.
55 """ 57 """
56 raise NotImplementedError 58 raise NotImplementedError