Confused with SDR classifier and very small alpha values

Hello,

I have been struggling to get reasonable results from the SDR classifier, and recently was able to reproduce what I am seeing in a much smaller example.

I am currently attempting to swarm over some financial data where I am attempting to predict a rolling standard deviation of prices that have traded in a given window.

When I swarm, I end up getting a model that typically has a very small alpha for instance

             'clParams': {'alpha': 0.0001,
                          'regionName': 'SDRClassifierRegion',
                          'steps': '1',
                          'verbosity': 0},

When I run this model by itself using code that was adopted from the one hot gym example, I see no error in the prediction. In other words if the rolling standard deviation at t=1 happened to be .524684651819 I would get that exactly as the prediction (to the same precision)!

I have played around alot trying to figure out what I was doing wrong, assuming I must just be looking at the wrong value for the 1 step ahead prediction, but after playing more with the examples, there is something odd going on. If I run the one hot gym example with a model with a very small alpha, the exact same results are produced

Steps to produce this oddity-

  1. run $NUPIC/examples/opf/clients/hotgym/prediction/one_gym/swarm.py
  2. edit the generated model config to an alpha of .0001 as show in the config snippet above
  3. run $NUPIC/examples/opf/clients/hotgym/prediction/one_gym/run.py
  4. examine rec-center-hourly_out.csv - predictions are 100% exact, oddly the output from step 3 does report error scores.

I am either very confused on how this new classifier works or there is some error that is allowing it to snoop the correct value.

Thanks in advance for any clarity that can be provided.

Phil

1 Like

I recently rolled back to the 0.5.3 version of nupic and attempted the same experiment using the one hot gym example and the CLA classifier, and manually manipulating my alpha to be very small, and with that classifier / build it seems to NOT behave the same way. IE predictions are made that are reasonable, and not identical to the actual value.

I think that my understanding was subject to an off by one error, and essentially, I am just getting the last known value and the best next step prediction with the SDR Classifier.

@pelsasser Sorry there’s no response here yet. I don’t know much about classification, and I know that @ycui is busy. Please standby and I’ll try to help you out next week. :confused: I’m neck-deep recording and editing the SP episode of HTM School.

There have been some recent changes to the SDRClassifier. It sounds like you figured out what the confusion was then?