Checking before I delve: next-step predictions possible from multiple scalar & category data?

Just want to double-check that nupic is up to a task I’m imagining for it before I begin my delve into how to code it up. I have streaming data from several sensors at around 10Hz, with samples from every sensor for a given time point. There’s also a column that has a label for every timepoint, and there’s three unique labels. The labels usually run in chunks of 20s, then switch to another label. So far as I understand the temporal algorithm in nupic, I think it should be able to take as input the data from the sensors as well as the labels, and start learning how to predict the next timestep’s sensor values and label. So far I only see examples in the git repo for the simpler case of a single column of sensor values through time and just wanted to double-check that if I delve into the mechanics a bit more, I should be able to extend to this multi-column (inc. both scalar and category) data. Yes?

You can feed multiple different input fields (or ‘variables’ or ‘columns’ as you call them) into a single NuPIC model, yes. You’d create a separate encoding for each and then concatenate them into one. This concatenation is then fed into the SP and TM, as is done in the HotGym example with the Datetime and Scalar values.

One thing about numerous input fields in a single model is that you can only set one variable as the ‘predicted’ value - which could be the label in your case. One thing to note is that since all the inputs are infused into single SDR’s at each time step, the anomaly scores coming out represent the level of unpredicted-ness for the entire input as a whole (not just the ‘predicted’ field).

It’s usually advised to try separate NuPIC models for each individual field, though if you’re trying to predict the ‘label’ field based on the values of other fields this would fall short.

In the API demo there’s an example of the concatenation of encoding values, which you could replicate for any number of fields (though best to keep it under 5 if possible).

3 Likes