Demonstration of the learning rule for RP models in the paper "Learning probabilistic representations with randomly connected neural circuits" (Maoz et al) (preprint: https://www.biorxiv.org/content/10.1101/478545v1.abstract)
This is a simple demonstration in MATLAB of the learning rule presented in the paper, used to train an RP model. This code requires the maxent_toolbox package for MATLAB, which is available from:
https://orimaoz.github.io/maxent_toolbox/
For training RP models with classical maximum-entropy methods, please refer to the maxent_toolbox.
This is a simple implementation of the learning rule made for readability, not for speed or performance. It can be optimized for speed by vectorizing code and by not using MATLAB. It can optimized for performance by replacing the simple gradient descent with something more sophisticated, and tuning learning rates.
Step 1: download install the maxent_toolbox for MATLAB from here: https://orimaoz.github.io/maxent_toolbox/
Step 2: download or clone this repository
Step 3: type demo_learning_rule from MATLAB to load some example training data and train a model.