HTM real time implementation - code

Hello everyone.

This is my first post. So i’m sorry if my question was already answered.
Analysing the nupic code for the example of the cpu, the script retrieves cpu info periodically and makes an append of that timestamp and that value and makes a prediction on that event. The score and input values are then appended to the previous scored events. My question is… Is this scoring being made assuming always the same initial training? or is this score built through the chain of events previously scored… In other words is this scored event now be used on the next scoring event?

Thank you for your attention and time
cumps

Exactly which CPU example are you referring to?

It’s this one:

Is this a good example to follow as a stream implementation?

I would start with the Quickstart documentation, which has an example of streaming anomaly detection on scalar data.

Oh thank you so much.

These examples right? http://nupic.docs.numenta.org/stable/guides/opf.html#examples

The way i’m seeying the code tells me the process is always:
0) starting point: (timestamp 0, value 0, score 0)

  1. new event (timestamp 1, value 1) ----> score 1 ----> append (timestamp1, value1, score1)
  2. new event (timestamp 2, value 2) ----> score 2 ----> append (timestamp2, value2, score2)
  3. and so on…

it does not matter if it is a csv or a stream of events, it always evaluates the next one event at a time using all the previously evaluated.

Sorry if being redundant, but this has to be very clear on my head.

Thanl you for everything

This is true. Whether csv or stream the model learns online, accumulating a memory and making predictions based on the current input and the state of the accumulated memory.

1 Like

To be clear, each row of data you send into the model must have a timestamp. That is where the time is derived, not from the time of the data being processed.

1 Like

Thank you so much @rhyolight @sheiser1

2 Likes