Maximum-Likelihood Estimation

class fitr.inference.mle.MLE(loglik_func, params, name='MLEModel')

Maximum Likelihood parameter estimation

Attributes:
name : str

Name of the model being fit. We suggest using the free parameters.

loglik_func : function

The log-likelihood function to be used for model fitting

params : list

List of parameters from the rlparams module

nparams : int

Number of free parameters in the model

param_rng : list

List of strings denoting the parameter ranges (see rlparams module for further details)

Methods

fit(data, n_iterations=1000, opt_algorithm=’BFGS’) Runs model-fitting algorithm
__printfitstart(self, n_iterations, algorithm, verbose) (Private) function to print optimization info to console
fit(data, n_iterations=1000, c_limit=0.0001, opt_algorithm='L-BFGS-B', verbose=True)

Runs the maximum a posterior model-fitting with empirical priors.

Parameters:
data : dict

Dictionary of data from all subjects.

n_iterations : int

Maximum number of iterations to allow.

c_limit : float

Threshold at which convergence is determined

opt_algorithm : {‘L-BFGS-B’}

Algorithm to use for optimization. Only works at present with L-BFGS-B.

verbose : bool

Whether to print progress of model fitting

Returns:
ModelFitResult

Representation of the model fitting results