help plz, @rhyolight and @learner
traceback (most recent call last):
encoding =encode (reader.next())
StopIteration
this is the input data
Iām using NuPIC 1.0.5, but your error looks like a problem with your file. Did you edit it? It should have 3 header rows and 4391 rows of data. See here.
Hy @way-sal, I think itād help to see more of your code since Iām not sure how you initialized āencodeā. Iād check how yours lines up with this section of @learnerās document (or the API demo):
record = [ā7/2/10 0:00ā, ā21.2ā]
Convert date string into Python date object
dateString = dt.strptime(record[0], ā%m/%d/%y %H:%Mā)
Convert data value string into float
consumption = float(record[1])
To encode, we need to provide numpy arrays for the encoders to populate
timeOfDayBits = np.zeros(timeOfDayEncoder.getWidth())
weekendBits = np.zeros(weekendEncoder.getWidth())
consumptionBits = np.zeros(scalarEncoder.getWidth())Now we call the encoders to create bit representations for each value
timeOfDayEncoder.encodeIntoArray(dateString, timeOfDayBits)
weekendEncoder.encodeIntoArray(dateString, weekendBits)
scalarEncoder.encodeIntoArray(consumption, consumptionBits)Concatenate all these encodings into one large encoding
encoding = np.concatenate((timeOfDayBits, weekendBits, consumptionBits))
@learnerand @sheiser1 thanks, i solve those problems but now i have this:
en franƧais
paramĆØtre non valide -15
paramĆØtre non valide -15
āmvā nāest pas reconnu en tant que commande interne ou externe , un fichier excutable ou un fichier de commandes
in english
invalid parameter -15
invalid parameter -15
āmvā is not recognized as an internal or external command, an executable file or a batch file
maybe the problem that iām on windows not linux -_-
Sure @way-sal no problem. If youād like to show the code producing that error maybe I can help (Iām not sure where -15 should come in as a parameter). Though if its a windows vs linux issue Iāll have to defer
this the code of @learner : https://github.com/psdyer/NuPIC-Algorithm-API-Example/blob/master/algorithm_api_example.ipynb
I notice that he comments before the cell containing that code:
For an extra treat, you can use the code below (on Linux) to make GIFs for the first N records of data.
You said youāre on Windows right, so maybe that part wonāt work. The block on code seems to produce GIFās, which is cool and likely work doing though not necessary to getting the algorithms running.
oops yes, thatās part of code run on Linux and is not necessary so I delete
That specific RuntimeError is saying that it is missing an environment variable called āUSERā. You might try setting it to some value to see if you can get any further:
SET USER=dell
(I donāt really use Windows much myself, so this may not be very helpful)
no is not working
Do you get the same error about the environment variable āUSERā not being defined, or some different error?
If it is the same error, then someone more familiar with Windows will have to help. I saw a similar error about missing environment variable āUSERā when installing NuPIC from source in Docker, but in my case it was resolved after setting the environment variable.
thanks @learner is very helpful , but what version of nupic do you use ? because i have a problem of modules , maybe my version of nupic canāt read some under moduls
Given the error, it looks like you need to define the USER environment variable. What is the code inside C:\Users\dell\Desktop\tests\moduls.py?
its your code :https://github.com/psdyer/NuPIC-Algorithm-API-Example/blob/master/algorithm_api_example.ipynb
and the other one is taken from :http://nupic.docs.numenta.org/1.0.5/quick-start/algorithms.html
pffff the same problemin configuration_base.py
Try running these two lines of code from a fresh command line.
>> from nupic.algorithms.sdr_classifier_factory import SDRClassifierFactory
>> classifier = SDRClassifierFactory.create(steps=[1], alpha=0.01)
If you get an error there, then thereās something wrong with your setup.
Iām at a loss then. Iāve only ever run NuPIC on Linux and Mac, and since this looks like a setup issue, Iām guessing something special has to be done in Windows. I suggest reading through the forum for NuPIC+Windows topics and see if thereās something youāre missing.
I donāt want to break your system, but as a hack you could try setting the USER variable to something/anything. Iām sure a quick google will show you how to do that.
ok thanks @learner , i will try that