htm-scheme
Hierarchical Temporal Memory in Scheme: some algorithms and experiments from numenta/htmresearch translated to Scheme
Science Score: 57.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 6 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.3%) to scientific vocabulary
Repository
Hierarchical Temporal Memory in Scheme: some algorithms and experiments from numenta/htmresearch translated to Scheme
Basic Info
Statistics
- Stars: 10
- Watchers: 4
- Forks: 0
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
HTM algorithms in Scheme
Scheme translations and extensions of some Numenta HTM (Hierarchical Temporal Memory) algorithms and neuroscience models.
Core algorithms translated from Numenta htmresearch and nupic repositories. (These Numenta repositories are in maintenance mode: see the htm.core community fork for some updates)
HTM algorithms and models run in Chez Scheme (standard R6RS Scheme with minor extensions) and are written in "plain" Scheme (ie using only the Scheme forms of common programming language constructs from mainstream PLs). No external libraries or other dependencies are used.
Figure rendering (see examples below) runs in Racket using its Graph Plotting library.
Example output from the combined_sequences experiment (replicating figure 6 in the Numenta paper Untangling Sequences- Behavior vs. External Causes):

The HTM-scheme combined_sequences project can also reproduce some of the experiments from A Theory of How Columns in the Neocortex Enable Learning the Structure of the World:
Fig3(B) One cortical column (C) Three cortical columns

Source organization
Directory structure, file names, and source file structure echo the htmresearch layout; organization of the code by function, and function and variable names, parallel Numenta code where possible: Scheme and Numenta python code can be read side-by-side.
frameworks/htm-concept.ss includes brief notes on the main data structures used, which are aimed at minimising space requirements.
Algorithms are implemented as Scheme libraries, named as (directory-name library-name), so the Chez Scheme (library-directories ...) form should include the path to HTM-scheme.
(Current algorithm implementations may be incompatible with older projects: see CRANKY.md)
Archived standalone-spatial-pooler.ss and standalone-temporal-memory.ss are older self-contained Scheme top-level programs including (obsolete) algorithm code, some tests, and hellosp, sptutorial, and hello_tm examples. They do not depend on other libraries, so to try these just install Racket or Chez Scheme, Open file in DrRacket, Run, then enter (hello-sp), (sp-tutorial), or (hello-tm) -- or in Chez Scheme:
$ cd HTM-scheme/archive
$ scheme
Chez Scheme Version 9.5.2
Copyright 1984-2019 Cisco Systems, Inc.
> (load "standalone-spatial-pooler.ss")
> (hello-sp)
See nupic/examples/sp/hello_sp.py
Random 1: 0.0% (12 99 145 167 198 212 364 412 516 564 569 640 748 758 773 ... 4030)
Random 2: 13.4% (50 145 153 214 276 379 399 432 538 574 578 663 673 748 824 ... 4034)
Random 3: 8.5% (12 42 83 124 297 424 451 613 634 666 784 847 859 860 895 ... 4030)
Repeat 3: 100.0% (12 42 83 124 297 424 451 613 634 666 784 847 859 860 895 ... 4030)
Noise .1: 97.6% (12 42 83 124 297 424 451 613 634 666 784 847 859 860 895 ... 4030)
Noise .3: 87.8% (12 42 124 297 424 451 613 634 666 784 847 859 860 895 918 ... 4030)
ok
For an introduction to development in Scheme, the EdX course "How to Code" is recommended:
"For students who have already programmed, this module may seem too easy –
but be careful! Be sure to learn **this** programming language.
While this language forms the conceptual core of nearly every programming
language you might have used, it is also different in important ways.
Take the time to go through this material carefully. Working through the
videos and practice materials for this module should take approximately
5-8 hours of dedicated time to complete."
EdX How to Code Module 1a Overview (course consists of 10 modules)
Owner
- Name: Roger Turner
- Login: rogerturner
- Kind: user
- Location: Three miles off the coast of NE England
- Repositories: 19
- Profile: https://github.com/rogerturner
"car and cdr are the only honest function names" [citation needed]
Citation (CITATION.cff)
cff-version: 1.2.0
title: HTM-scheme
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Roger
family-names: Turner
repository-code: 'https://github.com/rogerturner/HTM-scheme'
abstract: >-
Hierarchical Temporal Memory in Scheme: some Numenta HTM
algorithms and experiments translated to Scheme
keywords:
- Hierarchical Temporal Memory
- Chez Scheme
license: AGPL-3.0-or-later