Model framework#


Context Maintenance and Retrieval model.

CMR.likelihood(data, group_param[, ...])

Log likelihood summed over all subjects.

CMR.fit_indiv(data, param_def[, patterns, ...])

Fit parameters to individual subjects.

CMR.generate(data, group_param[, ...])

Generate simulated data for all subjects.

CMR.record(data, group_param[, subj_param, ...])

Record model states during a simulation.

CMR.parameter_sweep(data, group_param, ...)

Simulate data with varying parameters.

CMR.parameter_recovery(data, n_sample, param_def)

Run multiple iterations of parameter recovery.

Model configuration#

save_patterns(h5_file, items, **kwargs)

Write patterns and similarity matrices to hdf5.

load_patterns(h5_file[, features])

Load weights from an hdf5 file.


Read model configuration from a JSON file.


Configure a localist CMR network.

Model parameters#


Configuration of CMR model parameters.

CMRParameters.set_fixed(*args, **kwargs)

Set fixed parameter values.

CMRParameters.set_free(*args, **kwargs)

Set free parameter ranges.

CMRParameters.set_dependent(*args, **kwargs)

Set dependent parameters in terms of other parameters.


Evaluate dependent parameters based on input parameters.

CMRParameters.set_dynamic(trial_type, *args, ...)

Set dynamic parameters in terms of parameters and data.

CMRParameters.eval_dynamic(param[, study, ...])

Evaluate dynamic parameters based on data fields.

CMRParameters.set_sublayers(*args, **kwargs)

Set layers and sublayers of a network.

CMRParameters.set_weights(connect, regions)

Set weights on model patterns.

CMRParameters.set_sublayer_param(layer, ...)

Set sublayer parameters.