comparison dataset.py @ 90:a289b8bed64c

corrected comment
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Mon, 05 May 2008 17:13:07 -0400
parents 6749d18e11c8
children 6fe972a7393c
comparison
equal deleted inserted replaced
89:05dc4804357b 90:a289b8bed64c
25 or known length, so this class can be used to interface to a 'stream' which 25 or known length, so this class can be used to interface to a 'stream' which
26 feeds on-line learning (however, as noted below, some operations are not 26 feeds on-line learning (however, as noted below, some operations are not
27 feasible or not recommanded on streams). 27 feasible or not recommanded on streams).
28 28
29 To iterate over examples, there are several possibilities: 29 To iterate over examples, there are several possibilities:
30 - for example in dataset([field1, field2,field3, ...]): 30 - for example in dataset:
31 - for val1,val2,val3 in dataset([field1, field2,field3]): 31 - for val1,val2,... in dataset:
32 - for example in dataset(field1, field2,field3, ...):
33 - for val1,val2,val3 in dataset(field1, field2,field3):
32 - for minibatch in dataset.minibatches([field1, field2, ...],minibatch_size=N): 34 - for minibatch in dataset.minibatches([field1, field2, ...],minibatch_size=N):
33 - for mini1,mini2,mini3 in dataset.minibatches([field1, field2, field3], minibatch_size=N): 35 - for mini1,mini2,mini3 in dataset.minibatches([field1, field2, field3], minibatch_size=N):
34 - for example in dataset:: 36 - for example in dataset::
35 print example['x'] 37 print example['x']
36 - for x,y,z in dataset: 38 - for x,y,z in dataset: