Backtracking TM and Cell4.cpp don't work

I’ m now trying to implement nupic to edge computers. Nupic includes everything and it’s foot print is considerably large. For edge computers, foot print should be as small as possible.

According to the discussion here.

  • The TM handles repeating sequences poorly, by default. The only immediately available solution is to use resets.
  • Backtracking can act as a replacement for resets

So, I have implemented Backtracking TM Algorithm API which appears in here

http://nupic.docs.numenta.org/stable/api/algorithms/sequence-memory.html#module-nupic.algorithms.backtracking_tm

  • Use output of BacktrackingTMCPP.compute()
  • BacktrackingTMCPP.getPredictedState()
  • BacktrackingTMCPP.predict(nSteps)

The result is quite strange. The predicted columns are very big, e.g. 753 columns and doesn’t change while learning.

Since BacktrackingTMCPP does not work, I have tried Cell4.cpp

  • Using the following option, static library has been build.
  • To build nupic.core as a standalone static library, pass -DNUPIC_BUILD_PYEXT_MODULES=OFF.
  • Using the library and include file, anomaly detection C++ code has been programmed.
    tp.compute(rIn, rOut, true, true);

The result is rIn and rOut of Temporal Memory are the same. Length is 40. Cell4.cpp does also does not work.

Are there anyone who has tried “Backtracking TM” Algorithm API and Cell4.cpp?

Same here!! I first tried OPF model, which uses Backtracking TM and it works well with repeating sequence. However, OPF model only deals with one record with one timestamp and one value, so I turn to implement a model from scratch to fit my data with several fields. BacktrackingTM will not work if I try BacktrackingTM.getPredictedState(), so I turn to TM but it deals with repeating sequences poorly. Anyone can help? Thanks!!!

It could be that the OPF is doing something magical to its model instance. Can you share your code?

my code is nearly the same as the one shown in http://nupic.docs.numenta.org/stable/quick-start/opf.html#feed-the-model-data
Thanks!!

But does the exact quick start code work? You can find the complete script in the docs folder.

I think it should work because I use nearly all the same functions as those in quick start code.

What is different?