Add nfidd_sample function to speed up course inference#457
Conversation
- Reduce default iterations from 1000 to 500 for both warmup and sampling - Set parallel_chains to 4 by default - Update course materials to use new function - Add comprehensive documentation with @inheritParams - Maintain full cmdstanr compatibility via ... parameter Addresses #220 by providing faster inference for course exercises while maintaining statistical validity for educational purposes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix malformed YAML header that was preventing proper rendering of the R estimation and renewal equation session. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove stray ::: on line 60 that was causing markdown parsing issues. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Found and fixed an unpaired |
|
Do we also want to apply this to the data generation in |
|
I didn't for now as I didn't want to rerun but but if we do need to then yes |
…-of-an-epidemic.qmd
|
I skim read the whole course and from what is in the html I saw nothing concerning i.e the figures and the printed summary. As we suppress warnings though there is a chance that some of the models haven't converged but from the site I saw no evidence of that. |
sbfnk
left a comment
There was a problem hiding this comment.
I can see benefits for sticking with the original syntax and just writing the smaller number of samples explicitly over hiding the cmdstanr command but I don't feel strongly.
Co-authored-by: Sebastian Funk <sebastian.funk@lshtm.ac.uk>
Co-authored-by: Sebastian Funk <sebastian.funk@lshtm.ac.uk>
Co-authored-by: Sebastian Funk <sebastian.funk@lshtm.ac.uk>
Co-authored-by: Sebastian Funk <sebastian.funk@lshtm.ac.uk>
I didn't do this as I thought we wanted to tell people once and then not make them worry about it as imo its not super important to the learning objectives. It also makes it easier to change if we need to going forward. |
Summary
nfidd_sample()function with optimized defaults for course speedparallel_chains = 4by default to utilize multiple coresChanges
nfidd_sample()function with course-optimized defaultsnfidd_sample()instead of directmodel$sample()Rationale
The current Stan models can be slow for course exercises, particularly when students are running multiple models or working on slower machines. This function provides:
...for experimentationTesting Plan
Closes #220
🤖 Generated with Claude Code