Mercurial > pylearn
changeset 242:ef70a665aaaf
Hmm... that was committed by Fred I think, I got lost by Mercurial I think
author | delallea@opale.iro.umontreal.ca |
---|---|
date | Fri, 30 May 2008 10:19:16 -0400 |
parents | ddb88a8e9fd2 (diff) 97f35d586727 (current diff) |
children | c8f19a9eb10f |
files | dataset.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/dataset.py Thu May 29 10:42:29 2008 -0400 +++ b/dataset.py Fri May 30 10:19:16 2008 -0400 @@ -47,14 +47,14 @@ columns/attributes are called fields. The field value for a particular example can be an arbitrary python object, which depends on the particular dataset. - We call a DataSet a 'stream' when its length is unbounded (otherwise its __len__ method + We call a DataSet a 'stream' when its length is unbounded (in which case its __len__ method should return sys.maxint). A DataSet is a generator of iterators; these iterators can run through the examples or the fields in a variety of ways. A DataSet need not necessarily have a finite or known length, so this class can be used to interface to a 'stream' which feeds on-line learning (however, as noted below, some operations are not - feasible or not recommanded on streams). + feasible or not recommended on streams). To iterate over examples, there are several possibilities: - for example in dataset: @@ -81,7 +81,7 @@ - for field_examples in dataset.fields(): for example_value in field_examples: ... - but when the dataset is a stream (unbounded length), it is not recommanded to do + but when the dataset is a stream (unbounded length), it is not recommended to do such things because the underlying dataset may refuse to access the different fields in an unsynchronized ways. Hence the fields() method is illegal for streams, by default. The result of fields() is a L{DataSetFields} object, which iterates over fields, @@ -599,7 +599,7 @@ * for field_examples in dataset.fields(): for example_value in field_examples: ... - but when the dataset is a stream (unbounded length), it is not recommanded to do + but when the dataset is a stream (unbounded length), it is not recommended to do such things because the underlying dataset may refuse to access the different fields in an unsynchronized ways. Hence the fields() method is illegal for streams, by default. The result of fields() is a DataSetFields object, which iterates over fields,