Writing a custom encoder

Can anyone point me towards material describing how to write a custom encoder?

Is there any doc?
Or is it a matter of hacking the existing code (on a somewhat trial and error basis)?


The BAMI chapter on encoding should have all the info you need from a theory stand point:

For the actual implementation, assuming you are working in Python you should subclass the Encoder class like the other encoders in NuPIC:


You can also look at several encoders I implemented for my project :

they are very simple and I think you will grasp the logic by simply reading the code.