Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error analysis tutorial #4174

Merged
merged 1 commit into from
Aug 2, 2021

Conversation

biermanncarl
Copy link
Contributor

Description of changes:

  • Adds a tutorial that teaches users the basics of error analysis.

This will solve the tutorial side of issue #3958

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@biermanncarl biermanncarl changed the title Add Error analysis tutorial WIP Add Error analysis tutorial Mar 24, 2021
@KaiSzuttor KaiSzuttor marked this pull request as draft March 24, 2021 13:17
@jonaslandsgesell
Copy link
Member

jonaslandsgesell commented Mar 25, 2021

I would propose to generate a correlated time-series via for example the AR-1 process. This is trivial. It will save a lot of time in the generation of the time-series and you can make the discussion independent of MD/MC sampling. I would also refer to the Markov-Chain central limit theorem. This is the straight forward way to introduce the error estimate like it can be found in the paper by Janke.

@biermanncarl
Copy link
Contributor Author

Do these tutorials need to be tested? They don't rely on ESPResSo, at all, but only NumPy, Matplotlib and SciPy.

@jngrad
Copy link
Member

jngrad commented May 12, 2021

Do these tutorials need to be tested? They don't rely on ESPResSo, at all, but only NumPy, Matplotlib and SciPy.

Yes, all tutorials need to be tested. It's the only way to be sure that the solution cells indeed work. You can add np.random.seed(42) at the beginning of the test to fix the seed and get reproducible random sequences, and check that the final standard error of the mean and autocorrelation time are correct.

Copy link
Member

@jngrad jngrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First round of comments, more to come this week.

doc/tutorials/error_analysis/error_analysis_part1.ipynb Outdated Show resolved Hide resolved
doc/tutorials/error_analysis/error_analysis_part1.ipynb Outdated Show resolved Hide resolved
doc/tutorials/error_analysis/error_analysis_part2.ipynb Outdated Show resolved Hide resolved
@jonaslandsgesell
Copy link
Member

Plotting the analytical autocorrelation function (see B_n in https://en.m.wikipedia.org/wiki/Autoregressive_model ) in the plot where you show the estimated auto correlation function could be interesting to the reader?

Copy link
Member

@jngrad jngrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proposed changes are in jngrad/espresso@error-analysis-tutorial.

@jonaslandsgesell
Copy link
Member

jonaslandsgesell commented Jul 14, 2021

Did you consider teaching bootstrap and showcasing https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.bootstrap.html#scipy.stats.bootstrap ?

Scipy does not seem to use block bootstrap which is needed for correlated time series data.
Potentially, this python package could be showcased:
https://pypi.org/project/recombinator/

@jngrad
Copy link
Member

jngrad commented Jul 30, 2021

Teaching bootstrapping would make this tutorial quite long. We also want to limit the number of python dependencies in ESPResSo.

@jngrad jngrad self-assigned this Jul 30, 2021
Teach error analysis of observables using correlated simulation data.

Co-authored-by: Jonas Landsgesell <jonaslandsgesell@users.noreply.github.com>
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
@jngrad jngrad changed the title WIP Add Error analysis tutorial Add error analysis tutorial Aug 2, 2021
@jngrad jngrad marked this pull request as ready for review August 2, 2021 11:00
@jngrad jngrad added this to the Espresso 4.2 milestone Aug 2, 2021
@jngrad jngrad added the automerge Merge with kodiak label Aug 2, 2021
@kodiakhq kodiakhq bot merged commit 0bf872c into espressomd:python Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge with kodiak
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants