bsfit.nodes.models.utils.get_logl

bsfit.nodes.models.utils.get_logl(fit_p: numpy.ndarray, params: dict, stim_mean: pandas.core.series.Series, data: pandas.core.series.Series)[source]

calculate the log(likelihood) of the data given the model

Parameters
  • fit_p (np.ndarray) – the model fit parameters

  • params (dict) –

    the parameters:

    params: {
        "task": {
            "fixed_params": the task fixed parameters
            },
        "model": {
            "fixed_params": the model fixed parameters
            "init_params": the model initial parameters
        }
    

  • stim_mean (pd.Series) – stimulus features (e.g., motion direction)

  • data (pd.Series) – stimulus feature estimates to fit

Returns

-log(likelihood) of data given model

Return type

(float)