Thanks, Chetan,

Any tutorials, examples of how to use temporal_memory.py? The nice
thing about old TP is it has an example: hello_tp.py.

John.

On Mon, Jul 13, 2015 at 7:55 PM, Chetan Surpur <[email protected]> wrote:
> Hi John,
>
> The TP is now called "Temporal Memory", and there's a new implementation of
> it in NuPIC [1]. Please use this latest version instead, and let us know if
> you still find issues with the results.
>
> [1]
> https://github.com/numenta/nupic/blob/master/nupic/research/temporal_memory.py
>
> Thanks,
> Chetan
>
> On Jul 13, 2015, at 4:44 AM, John Blackburn <[email protected]>
> wrote:
>
> Dear All
>
> I'm trying to use the temporal pooler (TP) directly as I want to get
> into the details of how Nupic works (rather than high level OPF etc)
>
> Having trained the TP I used this code to get some predictions:
>
> for j in range(10):
>    x=2*math.pi/100*j
>    y=math.sin(x)
>
>    print "Time step:",j
>
>    for k in range(nIntervals):
>        if y>=ybot[k] and y<ytop[k]:
>            print "input=",x,y,k,rep[k,:]
>            tp.compute(rep[k,:],enableLearn=False,computeInfOutput=True)
>            tp.printStates(printPrevious = False, printLearnState = False)
>            break
>
>
> Here is the result I got:
>
> Time step: 0
> input= 0.0 0.0 9 [0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]
>
> Inference Active state
> 0000000001 0000000000
> 0000000000 0000000000
> Inference Predicted state
> 0000000000 0000000000
> 0000000001 0000000000
> Time step: 1
> input= 0.0628318530718 0.0627905195293 10 [0 0 0 0 0 0 0 0 0 0 1 0 0 0
> 0 0 0 0 0 0]
>
> Inference Active state
> 0000000000 1000000000
> 0000000000 0000000000
> Inference Predicted state
> 0000000000 0000000000
> 0000000001 0000000000
> Time step: 2
> input= 0.125663706144 0.125333233564 11 [0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
> 0 0 0 0 0]
>
> Inference Active state
> 0000000000 0100000000
> 0000000000 0100000000
> Inference Predicted state
> 0000000000 0000000000
> 0000000000 1110000000
> Time step: 3
> input= 0.188495559215 0.187381314586 11 [0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
> 0 0 0 0 0]
>
> Inference Active state
> 0000000000 0000000000
> 0000000000 0100000000
> Inference Predicted state
> 0000000000 0000000000
> 0000000000 1110000000
>
> You can see that in time step 3, one cell (12th column) is shown as
> being both in the active and predictive state, which I though was
> impossible. (its inference active state is 1 and its inference
> predicated state is 1)
>
> Also if you look at time step 0, only 1 cell is in the predictive
> state. However, the input that comes in at time step 1 activates the
> colum to the right of this cell (the 11th slot is "1") so I would
> expect the 11th column to have both cells active, the "unexpected
> input state" but this does not happen.
>
> Can anyone explain this?
>
> John.
>
>

Reply via email to