mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
docs: details about jackknife conversion added
This commit is contained in:
parent
1fabdb0751
commit
85f37a7abf
2 changed files with 5 additions and 1 deletions
|
@ -567,7 +567,8 @@ class Obs:
|
||||||
for the given ensemble and replicum. The zeroth entry of the array contains
|
for the given ensemble and replicum. The zeroth entry of the array contains
|
||||||
the mean value of the Obs, entries 1 to N contain the N jackknife samples
|
the mean value of the Obs, entries 1 to N contain the N jackknife samples
|
||||||
derived from the Obs. The current implementation only works for observables
|
derived from the Obs. The current implementation only works for observables
|
||||||
defined on exactly one ensemble and replicum.
|
defined on exactly one ensemble and replicum. The derived jackknife samples
|
||||||
|
should agree with samples from a full jackknife analysis up to O(1/N).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if len(self.names) != 1:
|
if len(self.names) != 1:
|
||||||
|
|
|
@ -519,3 +519,6 @@ def test_jackknife():
|
||||||
tmp_jacks[i + 1] = (n * mean - full_data[i]) / (n - 1)
|
tmp_jacks[i + 1] = (n * mean - full_data[i]) / (n - 1)
|
||||||
|
|
||||||
assert np.allclose(tmp_jacks, my_obs.export_jackknife())
|
assert np.allclose(tmp_jacks, my_obs.export_jackknife())
|
||||||
|
my_new_obs = my_obs + pe.Obs([full_data], ['test2'])
|
||||||
|
with pytest.raises(Exception):
|
||||||
|
my_new_obs.export_jackknife()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue