Online Prediction Framework

hi,
first step to my code is create a encoder , my data set is like these {%Y-%m-%d %H:%M:%S.%f , float, float}

2018-10-06 00:00:00.033,-0.160,-0.075
2018-10-06 00:00:00.036,-0.155,-0.070
2018-10-06 00:00:00.039,-0.160,-0.070
2018-10-06 00:00:00.042,-0.175,-0.065
2018-10-06 00:00:00.044,-0.180,-0.055
2018-10-06 00:00:00.047,-0.185,-0.050
2018-10-06 00:00:00.050,-0.170,-0.050
2018-10-06 00:00:00.053,-0.155,-0.040
2018-10-06 00:00:00.056,-0.175,-0.040
2018-10-06 00:00:00.058,-0.180,-0.055

to encode my data set:

  • To the date : DateEncoder
  • To float:RandomDistributedScalarEncoder

but the probleme in my data time is with Millisecond and the parameters of DateEncoder is with Day and hour.
so my question is to solve this probleme:
*I must create Model Parameters Or Create an OPF Model ?
*change the parameters of DateEncoder ? (how)
I use this link to learn:HTM
thanks

1 Like

If your dates are in milliseconds, the date encoder is not going to produce any useful semantic encodings. Milliseconds are not “human scale” time periods.

Model params are used to create all types of models in our examples.

So in my case, what type of encoders could I use to my data set

Scalar encoders for your scalar data, but what does your data represent? When you plot this data, do you see patterns?

my data are present signal ECG

Yes, I will use scalar encoders for my scalar data, but I 'm confused about the type of encoders for my data time because my time is with millisecond

You don’t encode time because it is at sub-human scale. Humans don’t semantically understand sub-second timing.

Have a look at this, It is a similar data type.

Also:

Here is the source: https://github.com/rhyolight/online-anomaly-detection/tree/master/mat_src

1 Like

hi matt,
I try your exemple https://github.com/rhyolight/online-anomaly-detection/tree/master/mat_src , and I make some changes in the model_params the update of the parametrs of SP and TM but have this error :
return _engine_internal.Network_addRegion(self, *args, **kwargs)
TypeError: init() takes at least 3 arguments (3 given)

Unfortunately that code is pre NuPIC 1.0, so it is broken. You should be able to lift the model parameters from it and apply them to your code.

I should mention the OPF Quickstart in case you haven’t seen it.