mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
feat: correlated_fit now throws an exception when the correlation matrix
is ill conditioned with respect to the machine precision. Criterion for warning for ill-conditioned covariance matrix changed to cond > sqrt(eps) Test added.
This commit is contained in:
parent
a069f84264
commit
e6813a6c8e
2 changed files with 10 additions and 2 deletions
|
@ -375,6 +375,12 @@ def test_fit_no_autograd():
|
|||
pe.total_least_squares(oy, oy, func)
|
||||
|
||||
|
||||
def test_singular_correlated_fit():
|
||||
obs1 = pe.pseudo_Obs(1.0, 0.1, 'test')
|
||||
with pytest.raises(Exception):
|
||||
pe.fits.fit_lin([0, 1], [obs1, obs1], correlated_fit=True)
|
||||
|
||||
|
||||
def test_ks_test():
|
||||
def f(a, x):
|
||||
y = a[0] + a[1] * x
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue