How can I implement the datetime encoder in the C# using HTM?


What is HTM? Kindly describe it in very simple words and also, help me to implement the code and how tto connect HTM to C#? I have to declare some library to link HTM to my Datetime code? Or I have to install something for it, to get linked with C#? Kindly help me out with this. Thank you for your valuable time.


I don’t know of any recent C# code implementations of HTM. There is of course a C++ version you should know about if you’ve read

If you want to write HTM code in C# I think you’ll have to either:

  1. create a language binding for C# from nupic.core using swig or another developer tool
  2. write an HTM in C#

Sorry there is not another answer, but no one has written an HTM in C# yet. The ones I found are really old.


Have you considered simply translating the java, c++ or python implementations? There’s plenty of unit tests provided so it should be easy to translate them too and double check your own implementation.

The python is here (you’ll need a reasonable understanding of how the numpy library does vector operations, if not consider looking into the java implementation):

You will also have to translate the ScalarEncoder and Encoder base class:


See also: