Overview of code for the paper 'long- and short term history effects in a spiking network model of statistical learning'.
All code is written in MATLAB. If something is unclear, please feel free to contact me at amadeus.maes@gmail.com.
setup_network_simulation.mcreateUniform.m (the uniform sampler network)createReadOutRNN.m (the sensory network)dynamics_parameters.mexternal_input.pplasticity_parameters.mspontaneous_simulation.mtraining_simulation.m (compute_error.m tracks error during learning, plastic weights are saved in data folder)training_simulation.m):sample_target.mtest_setup.mplotUNIFORMRASTER.mplotReadOutRASTER.mtest_setup_exp.m:compute_expectation.m: compute_std_simtimes.mcompute_slope.m (figure 5.A)compute_short_term_effect.m (figure 5.D)compute_weight_corrs.m (suppl fig 3.A)test_setup.m. 
Once you have trained the model, and recorded the plastic weights, you can then compute the slope of the psychometric curve with learning, 
or the short-term effect or the weight correlations. This data is not included because it is a few 100MB large.target_distr2.mat: hardcoded target distribution (see figure 2.B)wRE10_50_100_small_v3_100.mat: example plastic weights after 500 samples given to sensory network