exp_barumerli2024(flag);
exp_barumerli2024(..) reproduces figures from Barumerli and Majdak (2024). It serves as showing example on the usage of FrAMBI. The flag can be one of the following:
| 'basic' | Demonstrates how to use frambi_sample by applying a simple ITD-based sound-lateralization model barumerli2024_itdlateral as the agent and simulating response distributions for tasks. It uses sig_barumerli2024 as the enviroment. |
| 'dynamic' | Demonstrates how to create a dynamic scenario and apply frambi_plot and frambi_disp to visualize and display the agent-environment interactions. In this example, the agent tracks a moving sound source and interacts with the environment over time. This example also uses barumerli2024_itdlateral as the agent and sig_barumerli2024 as the enviroment. |
| 'variants' | Demonstrates how to handle multiple model variants. It compares the results for two model variants: with and without considering the lateral gain. This example also uses barumerli2024_itdlateral as the agent and sig_barumerli2024 as the enviroment. |
| 'fitting' | Demonstrates how to handle actual data from a behavioral experiment, fit model parameters to that data, and perform model comparisons. The model comparison is based on the Bayesian Information Criterion (BIC). It uses the mock-up model barumerli2024_mockup as the agent and sig_barumerli2024 as the enviroment. |
| 'all' | Runs all the examples. |
To run the basic example use :
exp_barumerli2024('basic');
|
|
To run the dynamic example use :
exp_barumerli2024('dynamic');
|
|
This code produces the following output::
time: 0.005
angle: 0.45
time: 0.01
angle: 0.9
time: 0.015
angle: 1.35
time: 0.02
angle: 1.8
time: 0.025
angle: 2.25
time: 0.03
angle: 2.7
time: 0.035
angle: 3.15
time: 0.04
angle: 3.6
time: 0.045
angle: 4.05
time: 0.05
angle: 4.5
time: 0.055
angle: 4.95
time: 0.06
angle: 5.4
time: 0.065
angle: 5.85
time: 0.07
angle: 6.3
time: 0.075
angle: 6.75
time: 0.08
angle: 7.2
time: 0.085
angle: 7.65
time: 0.09
angle: 8.1
time: 0.095
angle: 8.55
time: 0.1
angle: 9
time: 0.105
angle: 9.45
time: 0.11
angle: 9.9
time: 0.115
angle: 10.35
time: 0.12
angle: 10.8
time: 0.125
angle: 11.25
time: 0.13
angle: 11.7
time: 0.135
angle: 12.15
time: 0.14
angle: 12.6
time: 0.145
angle: 13.05
|
To run the example comparing variants use :
exp_barumerli2024('variants');
|
|
To run the fitting example use :
exp_barumerli2024('fitting');
|
|
This code produces the following output:: Optimized Parameters angular_uncertainty: 33.034 confusion_rate: 0.407 Statistical metrics: Log-likelihood: -753.133 BIC: 1516.077 Optimized Parameters angular_uncertainty: 96.311 Statistical metrics: Log-likelihood: -868.238 BIC: 1741.382 The model variant "considering front-back confusions" wins with a BIC difference of 225.30 to the next best alternative. |
R. Barumerli and P. Majdak. FrAMBI: A Software Framework for Auditory Modeling Based on Bayesian Inference. under review at Neuroinformatics, 2024.