Code for performing Bayesian inference using the PC/BC-DIM algorithm.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mwspratling beb767a34e
1st release September 2016
2 months ago
LICENSE 1st release September 2016 2 months ago
README.md 1st release September 2016 2 months ago
code.m 1st release September 2016 2 months ago
decode.m 1st release September 2016 2 months ago
define_weights_gabors_matrix.m 1st release September 2016 2 months ago
dim_activation.m 1st release September 2016 2 months ago
dim_activation_hierarchical.m 1st release September 2016 2 months ago
gabor2D.m 1st release September 2016 2 months ago
image_circular_cross_orientation.m 1st release September 2016 2 months ago
image_circular_grating.m 1st release September 2016 2 months ago
linear_pc_activation.m 1st release September 2016 2 months ago
pcbc_prob_1gaussian.m 1st release September 2016 2 months ago
pcbc_prob_1gaussian_prior.m 1st release September 2016 2 months ago
pcbc_prob_1gaussian_width_height.m 1st release September 2016 2 months ago
pcbc_prob_2gaussian.m 1st release September 2016 2 months ago
pcbc_prob_2integrate.m 1st release September 2016 2 months ago
pcbc_prob_2integrate_prior.m 1st release September 2016 2 months ago
pcbc_prob_2integrate_segregate.m 1st release September 2016 2 months ago
pcbc_prob_3basis.m 1st release September 2016 2 months ago
pcbc_prob_3integrate.m 1st release September 2016 2 months ago
pcbc_prob_4basis.m 1st release September 2016 2 months ago
pcbc_prob_4basis_hierarchical.m 1st release September 2016 2 months ago
pcbc_prob_Ngaussian.m 1st release September 2016 2 months ago
pcbc_prob_image_orientation.m 1st release September 2016 2 months ago
pcbc_prob_image_orientation_estvar.m 1st release September 2016 2 months ago
pcbc_prob_image_orientation_prior.m 1st release September 2016 2 months ago
plot_decode.m 1st release September 2016 2 months ago
plot_result1.m 1st release September 2016 2 months ago
plot_result2.m 1st release September 2016 2 months ago
plot_result3.m 1st release September 2016 2 months ago
plot_result4.m 1st release September 2016 2 months ago
plot_result_images.m 1st release September 2016 2 months ago
plot_weights.m 1st release September 2016 2 months ago
stats_gaussian_combination.m 1st release September 2016 2 months ago

README.md

This code implements the simulation results reported in:

M. W. Spratling (2016) A neural implementation of Bayesian inference based on predictive coding. Connection Science, 28(4):346-83.

Please cite this paper if this code is used in, or to motivate, any publications.


USAGE


This code was tested with MATLAB Version 8.3.0.532 (R2014a).

Some functions make use of the nansuite toolbox by Jan Glaescher, available at http://www.mathworks.com/matlabcentral/fileexchange/6837. These functions should thus be installed somewhere on your matlab path. Alternatively, the Statistics Toolbox can be used.

To use this software:

    start matlab 
    move to the directory containing this code 
    run one of the functions with the name pcbc_prob_*

Each of the pcbc_prob_* functions runs an experiment reported in the above publication. The following table gives details of which MATLAB function produces each figure in this article.

Figure MATLAB Function
2b-e pcbc_prob_1gaussian (Figs. 1, 2, 4, & 5)
3 pcbc_prob_1gaussian_width_height (Figs. 1, 2, 5, 6, 11, 12, 15 & 16)
4 pcbc_prob_Ngaussian
5b-e pcbc_prob_1gaussian_prior (Figs. 1 to 4)
6 pcbc_prob_2integrate (Figs. 1, 2, 5, & 6)
7 pcbc_prob_3integrate (Figs. 1, 2, 5, & 6)
8 pcbc_prob_2integrate_prior (Figs. 1, 2, 5, & 6)
9 pcbc_prob_2integrate (Figs. 3 & 4)
10a pcbc_prob_2integrate_segregate (Fig. 9)
10b as Fig8a but requires value of "stdInputs" to be modified in the code
11 pcbc_prob_3basis
12 pcbc_prob_4basis (Figs. 1-4, 8-11)
14a-g pcbc_prob_image_orientation (Figs. 1-7)
14h-i pcbc_prob_image_orientation_prior (Figs. 1-2)
15a pcbc_prob_image_orientation (Fig. 8)
15b pcbc_prob_image_orientation(1) (Fig. 8)
Result not shown in paper:
sec 3.5 pcbc_prob_4basis_hierarchical.m