koichi
April 26, 2018, 12:51am
1
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.
I hope this isn’t going off topic (I think it is relevant to the topic), this particular goof may hint at a possible direction to explore for stabilizing the representations in a repeating sequence. If the system is allowed to make a smaller number of additional connections (beyond maxNewSynapseCount) for some of the current winning cells (some number of them above activationThreshold) to a random sampling of the winning cells from T-1 that it isn’t already connected with, then the representa…
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
/* ---------------------------------------------------------------------
* Numenta Platform for Intelligent Computing (NuPIC)
* Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
* with Numenta, Inc., for a separate license for this software code, the
* following terms and conditions apply:
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Affero Public License for more details.
*
* You should have received a copy of the GNU Affero Public License
* along with this program. If not, see http://www.gnu.org/licenses.
*
* http://numenta.org/licenses/
* ---------------------------------------------------------------------
This file has been truncated. show original
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?
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.