nature-of-code / The-Nature-of-Code-archive

The very first build system for The Nature of Code
http://natureofcode.com
913 stars 151 forks source link

Intro.5: Monte Carlo vs Accept-Reject #353

Closed ybakos closed 10 years ago

ybakos commented 10 years ago

Just my opinion, but I think that renaming the montecarlo function in the text to something more akin to acceptReject better reflects the specific algorithm used. As a reader, digging into Monte Carlo after seeing the function does indeed lead me to investigate methods that use random numbers to observe phenomena, it is a deep and broad topic. The specific implementation, your description in the video, and exercise I.6 are all aligned with the idea of using functions that determine the accept-reject threshold for a "rejection sampling" approach. http://en.wikipedia.org/wiki/Rejection_sampling

shiffman commented 10 years ago

yes, this makes total sense. thank you. I will revisit when I do the next big round of updates.

stefanpenner commented 10 years ago

also agree, this was slightly surprising. Some research did clear it up, but renaming may prevent some initial confusion.

shiffman commented 10 years ago

Changed in the next edition.