Mercurial > pylearn
comparison linear_regression.py @ 427:fa4a5fee53ce
Showing the path to an online version of linear regressor.
author | Yoshua Bengio <bengioy@iro.umontreal.ca> |
---|---|
date | Tue, 22 Jul 2008 16:44:42 -0400 |
parents | e01f17be270a |
children | 0f8c81b0776d |
comparison
equal
deleted
inserted
replaced
426:d7611a3811f2 | 427:fa4a5fee53ce |
---|---|
33 The test_set must have field "input", and needs "target" if | 33 The test_set must have field "input", and needs "target" if |
34 we want to compute the squared errors. | 34 we want to compute the squared errors. |
35 | 35 |
36 The predictor parameters are obtained analytically from the training set. | 36 The predictor parameters are obtained analytically from the training set. |
37 | 37 |
38 *** NOT IMPLEMENTED YET *** | |
39 Training can proceed sequentially (with multiple calls to update with | |
40 different disjoint subsets of the training sets). After each call to | |
41 update the predictor is ready to be used (and optimized for the union | |
42 of all the training sets passed to update since construction or since | |
43 the last call to forget). | |
44 *************************** | |
45 | |
46 For each (input[t],output[t]) pair in a minibatch,:: | 38 For each (input[t],output[t]) pair in a minibatch,:: |
47 | 39 |
48 output_t = b + W * input_t | 40 output_t = b + W * input_t |
49 | 41 |
50 where b and W are obtained by minimizing:: | 42 where b and W are obtained by minimizing:: |
187 return CachedDataSet(ds) | 179 return CachedDataSet(ds) |
188 else: | 180 else: |
189 return ds | 181 return ds |
190 | 182 |
191 | 183 |
184 #TODO : an online version | |
185 class OnlineLinearRegression(OnlineLearningAlgorithm): | |
186 """ | |
187 Training can proceed sequentially (with multiple calls to update with | |
188 different disjoint subsets of the training sets). After each call to | |
189 update the predictor is ready to be used (and optimized for the union | |
190 of all the training sets passed to update since construction or since | |
191 the last call to forget). | |
192 """ | |
193 pass | |
194 | |
195 | |
196 | |
197 |