Mercurial > pylearn
changeset 317:14081904d8f3
doc updated regarding __getitem__ returning LookupList and .subset returning a DataSet
author | Thierry Bertin-Mahieux <bertinmt@iro.umontreal.ca> |
---|---|
date | Wed, 11 Jun 2008 16:40:47 -0400 |
parents | 5fe6d0c93109 |
children | e2eab74b6a28 |
files | dataset.py |
diffstat | 1 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/dataset.py Wed Jun 11 16:28:09 2008 -0400 +++ b/dataset.py Wed Jun 11 16:40:47 2008 -0400 @@ -99,13 +99,24 @@ of examples) can be extracted. These operations are not supported by default in the case of streams. - - dataset[:n] returns a dataset with the n first examples. + - dataset[:n] returns an Example with the n first examples. - - dataset[i1:i2:s] returns a dataset with the examples i1,i1+s,...i2-s. + - dataset[i1:i2:s] returns an Example with the examples i1,i1+s,...i2-s. - dataset[i] returns an Example. - - dataset[[i1,i2,...in]] returns a dataset with examples i1,i2,...in. + - dataset[[i1,i2,...in]] returns a. Example with examples i1,i2,...in. + + A similar command gives you a DataSet instead of Examples : + + - dataset.subset[:n] returns a DataSet with the n first examples. + + - dataset.subset[i1:i2:s] returns a DataSet with the examples i1,i1+s,...i2-s. + + - dataset.subset[i] returns a DataSet. + + - dataset.subset[[i1,i2,...in]] returns a DataSet with examples i1,i2,...in. + - dataset.<property> returns the value of a property associated with the name <property>. The following properties should be supported: