Member-only story

Neurological Time Series/Anomaly Detection: Hierarchical Temporal Memory

predicting power consumption with a ‘closer to biology’ neural network

Mark Cleverley
9 min readAug 3, 2020
3D imaged & colored section of hippocampus: University of Hong Kong

I really talked up Hierarchical Temporal Memory a while ago. It’s still rather new and far from the industry standard for deep learning, but its results are hard to argue with. I’m also a big believer in “emulate form to get function”, so I dove right into Numenta’s NuPIC HTM Python library to try and show some results for all my adulation.

Bad news: It’s written in 2.7. However, the open-source HTM community has put together their own fork, where they recoded the bindings (C++ base) to run in Python 3. I was able to install on a Mac running Mojave 10.14 via the command line PyPI option (after running pip install cmake) without too much hassle.

There’s some different syntax and naming conventions (documented on the fork linked above), but it’s the same tech as NuPIC’s official package — just a bit more granular. HTM.Core feels like Pytorch compared to NuPIC’s Keras.

Hitting the Gym

The real strength of HTM lies in pattern recognition, so I explored HTM.Core’s hotgym.py example:
Using a gym’s power consumption & timestamps, it trains a simple model to predict the next likely power value & detect…

--

--

Mark Cleverley
Mark Cleverley

Written by Mark Cleverley

data scientist, machine learning engineer. passionate about ecology, biotech and AI. https://www.linkedin.com/in/mark-s-cleverley/

No responses yet