pygsti.extras.drift.probtrajectory.negloglikelihood#
- negloglikelihood(probtrajectory, clickstreams, times, minp=0.0, maxp=1.0)#
The negative log-likelihood of a ProbTrajectory, modelling a time-dependent probability distribution.
- Parameters:
model (ProbTrajectory) – The model to find the log-likelihood of.
data (dict) – The data, consisting of a counts time-series for each measurement outcome. This is a dictionary whereby the keys are the outcome labels and the values are list (or arrays) giving the number of times that measurement outcome was observed at the corresponding time in the times list.
times (list or array) – The times associated with the data. The probabilities are extracted from the model at these times, using the model.get_probabilites method .
minp (float, optional) – A positive value close to zero. The value of p below which x*log(p) is approximated using a Taylor expansion (used to smooth out the parameter boundaries and obtain better fitting performance). The default value of 0. give the true log-likelihood.
maxp (float, optional) – A positive value close to and <= 1. The value of p above which x*log(p) the boundary on p being <= 1 is enforced using a smooth, quickly growing function. If set to 1. it gives the true log-likelihood.
- Returns:
The log-likehood of the model given the time-series data.
- Return type:
float