THE AUDITORY MODELING TOOLBOX

Applies to version: 1.6.0

View the code

Go to function

frambi_estimate
Estimate parameters of an auditory model

Usage:

[parameters, metrics] = frambi_estimate(data, agent, environment, options);

Input parameters:

data

Structure describing model variables and behavioral data:

  • variables: Matrix with independent variables (in columns) for each trial (in rows).
  • variablenames: Cell array with names of the variables.
  • responses: Matrix with behavioral responses (in columns) for each trial (in rows). The responses in each row must have been obtained in the experiment condition described by the same row in variables.
agent Structure representing the FrAMBI agent. See the general description of FrAMBI for more details. See exp_barumerli2024 for an example.
environment Structure representing the FrAMBI environment. See the general description of FrAMBI for more details. See exp_barumerli2024 for an example.
options

Structure representing the FrAMBI options. It needs to contain the structure estimate to control the estimation of parameters, with the following fields:

  • optimizer: Name of the optimizer. Currently, it must be 'bads'.
  • parameters: Structure containing the parameters of the optimizer.
  • disp: Flag controlling the display of the estimated parameters. If true, estimated parameters and the statistic metrics will be displayed.

Output parameters:

parameters

Structure with the estimated parameters and their names:

  • values: Matrix with the estimated parameter values.
  • names: Cell array with the parameter names. The names are those from agent.state.parameters with the field fit set to true.
metrics

Structure with the statistics of the estimation:

  • loglik: Log-likelihood of the estimation.
  • BIC: Bayesian information criterion of the estimation.

Description:

frambi_estimate(..) estimates agent's parameters by running an optimizer which estimates optimal agent's parameters for the provided experiment data by maximizing the likelihood of the experiment data given the model specified by the agent and environment under the constraints set by the options. The function validates input structures, prepares the log-likelihood function, executes the optimization, and reports results along with boundary checks if required.

The calculation of the likelihood is handled by frambi_likelihood.

The optimizer is defined in options.estimate.optimizer. Currently only the Bayesian Adaptive Direct Search (BADS, Acerbi et al., 2017) is implemented. BADS is used for optimization, handling the constraints and transformations as defined in the agent's parameters.

References:

L. Acerbi and W. J. Ma. Practical bayesian optimization for model fitting with bayesian adaptive direct search. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 30, pages 1834--1844. Curran Associates, Inc., 2017. [ .pdf ]

R. Barumerli and P. Majdak. FrAMBI: A Software Framework for Auditory Modeling Based on Bayesian Inference. under review at Neuroinformatics, 2024.