Combining Encoders

Hi,
I am making an application starting from the geospatial encoder and I get the doubt how doe two encoders work together. I mean how can I give more weight to an anomaly detected by one or by the other. I am starting with NuPic so maybe this question doesn’t makes sense but if anyone can help it would be great.

Another doubt I have, for example in the geospatial application if nupic see a route, call it 1, the second or the third time it see the route NuPic learnt it as normal. Is there a way to make that learning slower?
Then It raised another doubt how much time does the learning lasts? For example if Nupic sees this route 1 three times and then for the next 1000 routes, it doesn’t see it. Will Nupic remembered it?

Finally the last doubt. Whren I installed NuPic it showed me some error in the tests but like it was running… Now I don’t know if this errors can affect the way nupic works. I have tried some things and the erros have reduced to 45 (90 at first) but now I don’t know what else can I do. I have all the dependencies on the right version (I think). This is a screenshot of the tests.

1 Like

I am concerned that you do not have NuPIC installed correctly. How did you install it? Did you compile it yourself?

You combine different encoders using a MultiEncoder. This simply concatenates the encoders.

I don’t think you can do this. The anomaly indication represents the complete state of the system.

Try some different values for TM parameters here:

https://github.com/numenta/nupic/blob/master/src/nupic/research/temporal_memory.py#L82-L86

Increasing the permanenceIncrement should make the TM learn faster. Increasing the permanenceDecrement will make it forget faster.

Please @scott or @mrcslws correct me if I am wrong here.

1 Like

However you could also create two more models, one for each input. Each would give you a separate anomaly score.

I have installed it like you said in your video https://www.youtube.com/watch?v=rN-57iBvcT4, anyway I have reinstalled it as you say in here Nupic test fails.

I am new with nupic so maybe what i have done it isn’t correct but what I have done is to ad a scalar encoder to the one that is in the geospatial application. I mean I have add it like it is add the time of day encoder in there.

Thank for your help.

I see, so you are not actually combining encodings, but creating a model with two fields, one for geospatial location and one for time. That should be fine.

This might be the problem. That installation video is old (I’ll be working on updated versions soon). I suggest you simply use pip install nupic as the current README says and let me know if it works. But first uninstall nupic completely.

Yeah, it improve the model a lot. Then my question is how nupic get the result for the anomaly with more than one encoder, I mean wich is the “weight” of each encoder.

I have already done it as you explian in this topic Nupic test fails
I have uninstall nupic update pip (here was one of the problems) and all the dependencies. Then install nupic and finally I have did: git checkout tags/0.5.7.
But it still give me fails. I don’t know which can be the problema.

Ok, I have responded there. Let’s continue the discussion about your test failures there.

Sorry I haven’t seen it before. I will try it.

I have still the doubt how they work together. How does nupic get the anomaly value with this two encoders working in this way? Wich nupic think is more important? I don’t really know it and besides I haven’t add this new encoder to the prediction field (I have add it to the model only, I don’t know if that makes sense).

@Stromson Recommended reading on the subject: https://github.com/numenta/nupic/wiki/Anomaly-Detection-and-Anomaly-Scores

1 Like