David, I didn't see this before (CC me explicitly if you want me to see something right away). Did we resolve your issues in your PR? https://github.com/numenta/nupic/pull/1524
On Mon, Nov 17, 2014 at 7:07 AM, David Ragazzi <davidraga...@gmail.com> wrote: > Ok, it seems that really there's no mechanism to make Network API read > values for PassThroughEncoder. I have thought on a simple solution to > this. > > Binary arrays be passed as string but without colons: > > Square > string > T > > 000000000000000000000000000000000110000000000000011000000000000000000000000000000000000000000000 > > 000000000000000000000000000000000000110000000000000011000000000000000000000000000000000000000000 > > 000000000000000000000000000000000000000110000000000000011000000000000000000000000000000000000000 > > 000000000000000000000000000000000000000000110000000000000011000000000000000000000000000000000000 > > 000000000000000000000000000000000000000000000110000000000000011000000000000000000000000000000000 > > And adjust PassThroughEncoder to check if the value passed to it is a > list of integers or a string containing only 0's and 1's to be splitted > into a list of integers. Something like that: > > def encodeIntoArray(self, input, output): > """See method description in base.py""" > > if isinstance(input, basestring): > strInput = input > input = [] > for c in strInput: > if c == '0': > input.append(0) > else c == '1': > input.append(1) > else: > raise ValueError("Input should be string only with 0's and 1's.") > > if len(input) != len(output): > ... > > What do you think? > > On 16 November 2014 12:48, David Ragazzi <davidraga...@gmail.com> wrote: > >> >> Hi Scott and others, >> >> I'm trying use NuPIC Network API to handle a network that read a array of >> 0's and 1's from a file and pass it to a region without data conversion, >> i.e. using PassThroughEncoder. The problem is that FileRecordStream only >> accepts 'string', 'datetime', 'int', 'float', 'bool' for record data types. >> I wonder if NuPIC has some mechanism that handle these binary arrays, and >> if yes, how I set this mechanism ON and how I should fill a field in CSV >> file in order to it understand its content as a binary array. Ex: >> >> Square >> string >> T >> >> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 >> >> >> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 >> >> >> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 >> >> >> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 >> >> >> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 >> >> I've researched code including examples/test but without success.. This >> is the last step before I release NuPIC Studio with code generation for >> Network API! >> >> Thanks in advance! >> >> -- >> David Ragazzi >> MSc in Sofware Engineer (University of Liverpool) >> OS Community Commiter at Numenta.org >> -- >> "I think James Connolly, the Irish revolutionary, is right when he says that >> the only prophets are those who make their future. So we're not >> anticipating, we're working for it." >> > > > > -- > David Ragazzi > MSc in Sofware Engineer (University of Liverpool) > OS Community Commiter at Numenta.org > -- > "I think James Connolly, the Irish revolutionary, is right when he says that > the only prophets are those who make their future. So we're not > anticipating, we're working for it." >