numenta / nupic-legacy

Numenta Platform for Intelligent Computing is an implementation of Hierarchical Temporal Memory (HTM), a theory of intelligence based strictly on the neuroscience of the neocortex.
http://numenta.org/
GNU Affero General Public License v3.0
6.34k stars 1.55k forks source link

Forced limited precision for (float) variables #2641

Open breznak opened 9 years ago

breznak commented 9 years ago

Goal: numeric stability between c++/py/java/... implementations.

Q: should we do something like a "cropped floating data type"? And round all permanences to a certain precision? See https://github.com/breznak/nupic.core/commit/ee5bfafaf52c6bdd0c37012c5fcb78c1ba9c23a0

Includes TP/TM/SP,..

breznak commented 9 years ago

CC @scottpurdy

scottpurdy commented 9 years ago

Is there any clean way to do this in Python?

breznak commented 9 years ago

round5_() is easy to implement, but then it has to be applied to all values. Or strictly use setters() and put it there..

scottpurdy commented 9 years ago

I think we will have to take it on a case-by-case basis. We have been moving towards a C++ data structure that will handle most of the "permanences" cases. Reusing that in Python will help mitigate the number of locations we have to worry about. Other places we will have to apply rounding or other techniques depending on the way the value is used.