bsfit.nodes.models.utils.predict

bsfit.nodes.models.utils.predict(fit_p: numpy.ndarray, params: Dict[str, any], stim_mean: pandas.core.series.Series, data: pandas.core.series.Series, granularity: str)[source]

“”get model prediction at trial or summary statistics level

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

  • params (Dict[str, any]) – model and task parameters

  • stim_mean (pd.Series) – stimulus features

  • data (pd.Series) – stimulus feature estimates

  • granularity (str) –

    prediction level:

    - "trial": prediction are stochastic choices sampled
    from the model generative probability density
    - "mean": prediction statistics (mean and std calculated
    from the model generative probability density)
    

Returns

prediction variables

Return type

(dict)