Repository navigation
Fits simulate the times of their data and finite differences follow the tolerance - #397
Merged
Merged
Conversation
…rance A group of fit mappings simulates the start and the times of its data with the selections of its mappings only, also for observables which are timecourses without reductions; the evaluation of a fit simulates the output of the simulation for the curves of its figures. The finite differences of a fit follow the noise of the integrator: the least squares optimizer gets `diff_step = sqrt(relative_tolerance)` unless it is given, also the command line tools and the re-optimizations of a profile, and the Fisher information takes central differences with the cube root of the relative tolerance. The default step of SciPy and the former step of the Fisher information measured the noise of the integrator: the runs of the HCTZ fit stopped next to their start and its standard errors were up to 30 times too small.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Simulations of a fit
Formula("cp", "[Cve_hctz] * Mr_hctz"). They are evaluated on that output. Before, they ran the whole simulation and interpolated linearly.residuals(complete_data=True), the report) simulates the output of the simulation for the curves. Before, the curves of these groups were straight lines between the data times.Finite differences follow the noise of the integrator
diff_step = sqrt(relative_tolerance)of the settings (1e-3for the default1e-6) unless it is given. This also applies tofit_cli(was0.05) and the re-optimizations of a profile (was0.05). The step used is recorded with each run and stated in the methods.fisher_informationtakes central differences with the cube root of the relative tolerance (1e-2), was1e-6.The default step of SciPy measured the noise of the integrator. Every run of the HCTZ fit stopped next to its start values (
xtol). At a step of1e-6, the Fisher matrix of the HCTZ optimum was off by a factor 143 and its standard errors were up to 30x too small.Benchmarks
Simulations of one fit step on the HCTZ fit (
pytest -m benchmark -n 0 -s tests/fit/test_benchmark.py):Default settings, 20 runs from Latin hypercube starts,
develop→ this branch:cpformula)The HCTZ runs take longer because they now optimize instead of stopping at their start values.
Fisher information of the HCTZ optimum, against a reference at
rtol=1e-12:1e-6(old)1e-31e-2(new)Checklist
developpytestandty checkpass locallyruff checkandruff formatare cleanrelease-notes/(with the release commit) and, if needed, indocs/