I am newbie, help me run code

Try the --user flag, which tells python to install in non-system locations:

pip install nupic --user

This advice is also in the README.

yes. i run your command. but how can i run

your code, and i dont understand

From the root of the repo:

py.test tests/unit

can you help me?

Do you have any experience programming in Python?

no. i dont have any experence in python. i am newbie. i often use matlab. i just want to run it. but in python too hard to open one project. it is not similar to matlab.

can you tell me how can i run your code. i really want to see the results.

You do need to have some programming experience to run NuPIC. To test to see if you have NuPIC installed, you can run this sample code, which feeds scalar timestamped data into NuPIC:

python examples/opf/clients/hotgym/simple/hotgym.py

You should get output that looks like this (except the MAPE will be a bit different):

INFO:__main__:After 100 records, 1-step altMAPE=24.259312
INFO:__main__:After 200 records, 1-step altMAPE=17.637056
INFO:__main__:After 300 records, 1-step altMAPE=17.330338
INFO:__main__:After 400 records, 1-step altMAPE=16.735066
INFO:__main__:After 500 records, 1-step altMAPE=15.907724
INFO:__main__:After 600 records, 1-step altMAPE=16.227268
INFO:__main__:After 700 records, 1-step altMAPE=15.607904
INFO:__main__:After 800 records, 1-step altMAPE=15.303115
INFO:__main__:After 900 records, 1-step altMAPE=15.445490

I must state, however, that this is forum is not the place to get general programming help or python help. We do expect users to have some basic familiarity with programming in general and Python.

thank you. i run your code. this is result
Reading data set: DataSets/OCR/characters/cmr_hex.xml

------------PY SpatialPooler Parameters ------------------
numInputs = 1024
numColumns = 16
columnDimensions = [16]
numActiveColumnsPerInhArea = 1
potentialPct = 1
globalInhibition = True
localAreaDensity = -1
stimulusThreshold = 0
synPermActiveInc = 0.3
synPermInactiveDec = 0.3
synPermConnected = 0.3
minPctOverlapDutyCycle = 0.001
dutyCyclePeriod = 1000
boostStrength = 2
spVerbosity = 1
version = 3

Training:

         Connected         Unconnected      Recognition

Cycle Percent Mean Percent Mean Accuracy

0    49.7253    0.649    50.2747    0.113       0.00000
1    33.1116    0.602    66.8884    0.065      56.25000
2    27.2644    0.700    72.7356    0.055      56.25000
3    25.9705    0.784    74.0295    0.050      56.25000
4    25.7690    0.802    74.2310    0.050      56.25000
5    25.7751    0.805    74.2249    0.050      56.25000
6    25.7751    0.805    74.2249    0.050      56.25000
7    25.7629    0.805    74.2371    0.050      56.25000
8    25.7629    0.806    74.2371    0.050      56.25000
9    25.7629    0.805    74.2371    0.050      56.25000

10 25.7629 0.805 74.2371 0.050 56.25000
11 25.7629 0.806 74.2371 0.050 56.25000
12 25.7629 0.806 74.2371 0.050 56.25000
13 25.7629 0.805 74.2371 0.050 56.25000
14 25.7629 0.805 74.2371 0.050 56.25000
15 25.7629 0.806 74.2371 0.050 56.25000
16 25.7629 0.806 74.2371 0.050 56.25000
17 25.7629 0.805 74.2371 0.050 56.25000
18 25.7629 0.806 74.2371 0.050 56.25000
19 25.7629 0.805 74.2371 0.050 56.25000
20 25.7629 0.806 74.2371 0.050 56.25000

Reading data set: DataSets/OCR/characters/cmr_hex.xml

Testing:

Input Output
0 0
1 1
2 2
Recognition mistakes:
Input Output
3 2
4 4
5 5
6 5
7 7
8 5
9 0
A A
B B
C C
D B
E C
F C

Accuracy: 56.2 %

is that fine?
sorry, i am just student, so i dont have expirence on python and HTM.
thank your help

Looks like it is working, but like @Jonathan_Mackenzie said earlier, HTM doesn’t do well on image recognition. NuPIC’s current implementation of HTM is focused only on sequence memory (temporal sequences). Spatial recognition is not its strong point.

oh. because my project is using HTM to recognize digits handwritten. so it means my project willnot have good result. isnot it?

ohh. you are Matt Taylor. i am watching your lessons on youtube. sorry, i dont recognize you. thank for your lessons.

1 Like

That’s correct. HTM cannot beat other methods of learning handwriting. You are welcome for the videos :slight_smile: