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.56k forks source link

Uniformize TemporalPooler and TemporalMemory names #1898

Open david-ragazzi opened 9 years ago

david-ragazzi commented 9 years ago

Currently nupic has 2 types of temporal processors: TemporalPooler and TemporalMemory. Both are implemented in "pure python" and "hibrid python with C++" versions. However their names are not suggestive enough to someone correlates such implementations each another. I suggest we rename TemporalPoolers to correspond to TemporalMemory tastes. In this case:

I think once serialization is done, this simple job could be done without many problems.

scottpurdy commented 9 years ago

Thanks for filing this David. We would probably want to move temporal memory implementations away from the name "temporal pooler" since they don't implement temporal pooling. This is a long-standing naming issue that we haven't been able to resolve in the code yet. That said, I'm not sure the best way to distinguish between the different implementations. I think a name that conveys their functional difference would be better than something like "old_temporal_memory" (implies outdated or worse) or similar.

david-ragazzi commented 9 years ago

I think a name that conveys their functional difference would be better than something like "old_temporal_memory" (implies outdated or worse) or similar.

The problem is finding which name better describes such TP/TP10x2 functional difference.. Anyway, maybe such functional difference could be simply moved into new temporal memory files/classes (not preserved as an "old" version) as @subutai suggest here:

I suggest we just focus on creating a C++ version of temporal_memory.py, ensure it works really well and fast, and move everything to it. Then we can just delete Cells4, TP.py, and TP10X2.py This would remove all the naming confusion. https://github.com/numenta/nupic.core/issues/351#issuecomment-75829073

In either case, if even so we reach the consensus that it is better we keep such functional difference in separate files, then I would suggest we use omnibus/general names like SpatialProcessor and TemporalProcessor which fits general principles of HTM theory (processing of spatial and temporal properties of a problem) and atenuate/elliminate this and future confusions. I.e. not matter if a TP has pooling, memory sequence, whatever, it still is a TemporalProcessor. To distinguish them, we could use (for example):

When people want import different versions in a same script, they could use aliases:

from nupic.research.temporal_processor_v1 import TemporalProcessor as TemporalProcessorV1
from nupic.research.temporal_processor_v2 import TemporalProcessor as TemporalProcessorV2

And when a script uses only an implementation, they could discard aliases: from nupic.research.fast_spatial_processor_v2 import SpatialProcessor

So in case of you create another kind of temporal processor in the future, you simply would create a file called temporal_processor_v3 and keep TemporalProcessor class name. (..we could use other convention than V1 and V2 to distinguish versions)

This convention has several advantages:

In summary, we could find what is the TP/TP10x2 functional difference, if such functional difference can be moved into new (pure python and c++) temporal_memory implementations or then keep it in separated files as already is currently (but using omnibus names with versioning).

rcrowder commented 9 years ago

Anything to make it easier for new people and drop confusing naming. Proposed changes seem fine for engineers, but may need closer mapping to biological processes in the future when more of the cortical layers are worked out.

At the moment Temporal Memory looks like it's acting at the cellular level (pyramidal). It maybe better to find a more appropriate name, to distinguish between non-cortex processing. If the Hippocampus and Medial Temporal Lobe have another method for memory storage, another name would be required there to separate it from the cortical memory processing (TM).

Whether the 'Temporal ' and 'Spatial' words remain undisturbed I'm unsure about. 'Pooler' seems appropriate to be retained. Although a closer naming to the actual functionality may be more appropriate.

david-ragazzi commented 9 years ago

Anything to make it easier for new people and drop confusing naming. Proposed changes seem fine for engineers, but may need closer mapping to biological processes in the future when more of the cortical layers are worked out.

At the moment Temporal Memory looks like it's acting at the cellular level (pyramidal). It maybe better to find a more appropriate name, to distinguish between non-cortex processing. If the Hippocampus and Medial Temporal Lobe have another method for memory storage, another name would be required there to separate it from the cortical memory processing (TM).

@rcrowder Actually I think the context here are processors with the same cortical purpose but implemented in different ways. Because this, I am suggesting separate present and future implementations by versions but keeping spatial and temporal prefixes. In the future if nupic have different processors for different purposes or biological parts then we could add cortical, hippocampal, etc, prefixes to them (SpatialCorticalProcessor, SpatialHippocampalProcessor, for example). Althought I don't believe that Numenta wishes implement other memory structures than those present in cortex (the own Jeff's words in ML).

david-ragazzi commented 9 years ago

Anyway, this discussion is quite old and it seems that is infinite because every time that we try using the Specific Name approach to naming such components, everyone have his own conventions (ML is a great example of these long discussions). Because this I'm suggesting we dissociate such specific names from such spatial and temporal processor class names and document their functional differences in their file descriptions and wiki.

scottpurdy commented 9 years ago

@david-ragazzi - v1, v2, etc is fine with me. But the name is "temporal memory" and since we relatively recently settled on the naming I don't think we should reopen that discussion any time soon unless there is a real need.

rhyolight commented 9 years ago

@david-ragazzi - v1, v2, etc is fine with me. But the name is "temporal memory" and since we relatively recently settled on the naming I don't think we should reopen that discussion any time soon unless there is a real need.

:+1:

david-ragazzi commented 9 years ago

@david-ragazzi - v1, v2, etc is fine with me. But the name is "temporal memory" and since we relatively recently settled on the naming I don't think we should reopen that discussion any time soon unless there is a real need.

Ok boss.. Let's use temporal_memory_v1 for TP and TP10x2 and temporal_memory_v2 for TemporalMemory. Once serialization is done, I'll work on this.