@yuanzhec The value of pdf (probability distribution function) represents the probability of generating a random sample wi. If the function generate_sample produces a random sample wi, then the probability of generating that random sample wi is non-zero, hence pdf != 0. So we are never dividing by zero here.
What if pdf = 0?
@yuanzhec The value of
pdf(probability distribution function) represents the probability of generating a random samplewi. If the functiongenerate_sampleproduces a random samplewi, then the probability of generating that random samplewiis non-zero, hencepdf != 0. So we are never dividing by zero here.