comparison dataset.py @ 338:7d4792fc28ae

Automated merge with ssh://projects@lgcm.iro.umontreal.ca/hg/pylearn
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Mon, 16 Jun 2008 17:17:50 -0400
parents 5e38ed2b3a75 0ce6e62ac6e5
children d96be0eba3cc
comparison
equal deleted inserted replaced
337:5e38ed2b3a75 338:7d4792fc28ae
719 719
720 def minibatches_nowrap(self,fieldnames,minibatch_size,n_batches,offset): 720 def minibatches_nowrap(self,fieldnames,minibatch_size,n_batches,offset):
721 assert self.hasFields(*fieldnames) 721 assert self.hasFields(*fieldnames)
722 return self.src.minibatches_nowrap(fieldnames,minibatch_size,n_batches,offset) 722 return self.src.minibatches_nowrap(fieldnames,minibatch_size,n_batches,offset)
723 def __getitem__(self,i): 723 def __getitem__(self,i):
724 return FieldsSubsetDataSet(self.src[i],self.new_fieldnames) 724 # return FieldsSubsetDataSet(self.src[i],self.new_fieldnames)
725 complete_example = self.src[i]
726 return Example(self.new_fieldnames,
727 [complete_example[field]
728 for field in self.src_fieldnames])
729
725 730
726 731
727 class DataSetFields(Example): 732 class DataSetFields(Example):
728 """ 733 """
729 Although a L{DataSet} iterates over examples (like rows of a matrix), an associated 734 Although a L{DataSet} iterates over examples (like rows of a matrix), an associated