NuPIC Geospatial Running Error

After running the server.py file of Nupic Geospatial, I get a darkened, watermarked map(which states ‘only for development purposes’). The interface displayed in the screenshots and tutorials of this application is not displayed and I can only see the map. I found the following warnings/errors on chrome’s java console:
1)NoApiKeys
2)SensorNotRequired
Does anyone know a solution for this, or has faced any similar issues?

2 Likes

This is a pretty old app, using a pretty old Google Maps API. I have not run it in a long time. I know that you need to set up Google Maps API keys somehow. That is probably your first step.

2 Likes

I got this thing working a while back and tested it on multiple samples as well and it worked great. Recently I tried a new data file and instead of getting red/green points, the output points were grey. Any reason why that would happen?

1 Like

Probably because the anomaly likelihood or score is not being produce properly, and is not a float value. Look through the logs coming out of NuPIC and the web console for errors.

1 Like

This was happening as not enough data points were available and timestamps of consecutive points were far apart. So I made a bigger file with more points and smaller differences in timestamps.
One thing I noticed was that output went from showing a route from red to green (without any orange) after encountering just the second instance of the route.
Also for a route which was learned and shown green , a new route with just a slight deviation at the end was shown completely red whereas only the small deviation should have shown red.

1 Like

This doesn’t make sense to me. How would it already be giving back high anomaly scores if it had not encountered anomalous data yet? Something else is wrong. Can you share your code?

1 Like

I am running the code provided on Geospatial GitHub with different gpx files.
I think I framed my doubt wrong. So I have three days of data on that route. On day 1 the route shows up as red since it hasn’t been encountered(pic not included). On the next days it turns green(pic included). Day 3’s route (pic included) is a minor deviation at the end. According to my understanding it should have shown that route green as well and red at point of deviation

1 Like

Yes exactly. Something is wrong with that route’s input data. Is there anything different about it? Is it a different time of day?

1 Like

Nope they are all at the same time. That’s another thing I tested. Where a same route encountered at a different time should show as red it shows up as green. This seems quite odd because the code is using opf ModelFactory and other examples like hot gym that use opf are taking into account the temporal aspects while predicting anamolous or not. The same is not happening for Geospatial.

1 Like

Can you share the input route files you’re using? I know this works, I’ve made videos about it. I can’t figure out what is wrong without seeing some details like data or code.

1 Like

I have emailed you a few files. Please do have a look

1 Like

@ansh979 Ok I looked at your routes, and I have some comments.

First of all, you only have 3 days of data, which is not much at all yet. So you can’t draw too many conclusions without seeing more patterns. For example, there could be weekly patterns that will not be exposed at this time scale, and the algorithm will have no chance to learn them.

Second, you must use the -t option when running NuPIC over the input data so that timestamp will be encoded:

You’ll get better results this way, but this will not resolve the issue you are pointing out. Your question is why was the 3rd day more anomalous than the 2nd, and to answer that, we need to look closely at where each of these routes start:

DAY 1

1st

DAY 2

2nd

This one starts behind where Day 1 started, and is anomalous until it realizes it has seen this sequence before the day before.

DAY 3

3rd

This one is very anomalous because it has seen two routes before (starting at different places) and at no point is one more probable than the other.


Short story is that you need more data. :slight_smile:

1 Like