D-mo

Results 208 comments of D-mo

While it's a bit of a show stopper for me (I like to understand everything I do), most people will probably just skimp over it. I just got back from...

Now, the confusing part... As I've mentioned in #1534 we've made a very unfortunate decision of using letter $f$ to designate inverse of the CDF, as well as arbitrary functions...

If I may suggest, the code in Listings 13, 14 and 15 should be adjusted as follows: Listing 13: ```diff -double f(double d) { +double inv_cdf(double d) { return 2.0...

Another option maybe is to use a letter different from P for one of them? Just an idea.

@hrakaroo is correct: https://en.wikipedia.org/wiki/Unit_cube. The fix is pretty trivial - drop the word _unit_ from _unit cube_.

My gut feeling on these two points is this: Since, `pdf(x)` yields values less than 1, we are actually up-weighting all samples (with less frequently sampled areas being up-weighted more...

I was able to tie in points 1 and 2 above. Assuming point 2 is correct, we can rewrite our formula for estimating area of function $f(x)$ with PDF $p(x)$...

Found this wikipedia artice—[Monte Carlo integration](https://en.wikipedia.org/wiki/Monte_Carlo_integration#Importance_sampling)—which confirms that formula (1) above is the right way of integrating any arbitrary function $f$ with PDF $p$ using importance sampling. One important note:...

@rupsis I can see your point. The reason I brought this up is that I am a firm believer that a course should define all the terms used in it....

NB: On Windows, you will need to define NOMINMAX somewhere at the top (or in the CMake file).