Open AUTProgram opened 9 months ago
I can reproduce this with
name : ionics-fits
version : 1.3.9
description : Lightweight Python data fitting library with an emphasis on AMO/Quantum Information
dependencies
- numpy >=1.21.2,<2.0.0
- scipy >=1.7.1,<2.0.0
- statsmodels >=0.13.2,<0.14.0
After some debugging, the issue here is this: if the fit model ever tells us that the probability of a point should be 0 but the dataset has a non-zero value for that point, the log-likelihood function blows up. I'm not sure if there is a "standard" way of dealing with this, but in #177 I resolved it by replacing all points where the model function is exactly 0 or exactly 1 with a small epsilon:
eps = 1e-12
p[p == 0] = eps
p[p == 1] = 1 - eps
cc @r-srinivas
I tried to use the
BinomialFitter
to fit SDF scans for a single ion with theMolmerSorensenFreq
model. With the following codeget this error:
When I use the
NormalFitter
with the same parameters, fit works without problems, see below.