An introduction to importance sampling

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 พ.ค. 2018
  • This video explains what is meant by importance sampling, and how this method can be used to provide estimates of a distribution's characteristics, even if we are unable to sample from that distribution.
    This video is part of a lecture course which closely follows the material covered in the book, "A Student's Guide to Bayesian Statistics", published by Sage, which is available to order on Amazon here: www.amazon.co.uk/Students-Gui...
    For more information on all things Bayesian, have a look at: ben-lambert.com/bayesian/. The playlist for the lecture course is here: • A Student's Guide to B...

ความคิดเห็น • 46

  • @vladislavstankov1796
    @vladislavstankov1796 3 ปีที่แล้ว

    you are amazing! Every time when i have troubles understanding some concept and need to search the web, if i see that you have a video on this topic, is already solved for me.

  • @Hecklit
    @Hecklit 5 ปีที่แล้ว

    I really like the way you explain things. Thanks a lot.

  • @jorgepereiradelgado7492
    @jorgepereiradelgado7492 5 ปีที่แล้ว

    Great video! Thanks for putting effort into this, it really helped! Greetings from Spain.

  • @alexanderl.2689
    @alexanderl.2689 5 ปีที่แล้ว

    Thank you so much, with the help of your video I finally understand the idea behind IS

  • @lexparsimoniae2107
    @lexparsimoniae2107 3 ปีที่แล้ว

    Ben, you are a life saver.

  • @violinplayer7201
    @violinplayer7201 4 ปีที่แล้ว

    Well and very clearly explained! Thank you!

  • @kleemc6267
    @kleemc6267 5 ปีที่แล้ว

    Well done ! I like the graphics that shows convergence.

  • @sivad1025
    @sivad1025 3 ปีที่แล้ว

    You saved my life. Thanks.

  • @mystonefeel
    @mystonefeel 4 ปีที่แล้ว

    The best explain on importance sampling... good animation

  • @maurocamaraescudero1062
    @maurocamaraescudero1062 5 ปีที่แล้ว +2

    Great series of videos, complements very well the book by Casella! Would you please be able to add a link to the Mathematica animation code for both importance and rejection sampling? They would be tremendously useful!

  • @YChen-ut1dw
    @YChen-ut1dw 4 ปีที่แล้ว +1

    this is perfect, thank you

  • @AndriyDrozdyuk
    @AndriyDrozdyuk 5 ปีที่แล้ว

    Beautiful video.

  • @songlinyang9248
    @songlinyang9248 4 ปีที่แล้ว

    nice explained,thank you

  • @carloszarzar
    @carloszarzar 2 ปีที่แล้ว

    Professor Ben Lambert congratulations on the videos. Great didactics. My suggestion is to always keep the footer of videos clean (no written information). Because a lot of people watch their videos with subtitles, it often gets confused the subtitles and their writing and makes it difficult to learn. Again, I congratulate you on the initiative to democratize information here on TH-cam.

  • @emmanuelameyaw6806
    @emmanuelameyaw6806 3 ปีที่แล้ว +1

    Hi Lambert, it would be great to include sequential importance sampling in the series.

  • @inothernews
    @inothernews 6 ปีที่แล้ว +35

    Hi, thanks for the great video series. Question: for importance sampling, do we already assume we know what g is, such that given some x, we can compute g(x)? If we do, then couldn't we compute its mean analytically? If not, how do we resolve g(x) in the g(x)/f(x) term?

    • @SpartacanUsuals
      @SpartacanUsuals  6 ปีที่แล้ว +24

      Hi, thanks for your comment. Yes, you’re right that we need to know g(x) (at least up to a constant of proportionality). The beauty of importance sampling is that even if g(x) is unnormalised, however - and so we cannot compute the particular expectation - we can still use importance sampling to estimate it. Also, whilst I’ve illustrated how importance sampling works for a 1D example (where computing integrals is typically quite straightforward), importance sampling can be used in higher dimensional integration where it is usually not possible to compute integrals analytically. Hope that helps! Best, Ben

    • @inothernews
      @inothernews 6 ปีที่แล้ว +3

      Right, that cleared things up a lot. Thank you for your time!

    • @lesterknome
      @lesterknome 4 ปีที่แล้ว +1

      @@SpartacanUsuals If we cannot compute the integral of g analytically, in general are we able to compute the integral of f?

    • @robinranabhat3125
      @robinranabhat3125 3 ปีที่แล้ว +1

      @@SpartacanUsuals can you give an concrete example though . If you know ..

    • @robinranabhat3125
      @robinranabhat3125 3 ปีที่แล้ว

      @@ianpan0102 hi genius. I meant concrete example for multivariate problem. I meant an actual case where he actually does a freaking sampling without knowing the other distribution. And not just talk on how it's useful there. Even an 8 year old would understand that first part. If you have nothing informative to say, don't comment as if you know it.

  • @user-cc8kb
    @user-cc8kb 5 ปีที่แล้ว

    great video

  • @emmanuelameyaw6806
    @emmanuelameyaw6806 3 ปีที่แล้ว

    what if we are interested in another statistic like the median (r(x)) or quantile (h(x)) of g(x)? we just change 'x' in the derivation to 'h(x)' or 'r(x)'?

  • @omid_tau
    @omid_tau 5 ปีที่แล้ว +1

    dude it would be really helpful if you could reference the page in your book that the video refers too .

  • @shoryaagarwal561
    @shoryaagarwal561 2 ปีที่แล้ว

    This would really help for someone to understand why importance sampling is used for sampling rays in ray tracing. Thanks!!

  • @aishikpyne
    @aishikpyne ปีที่แล้ว

    I'm still a little confused on why, if we know the ratio of g(x)/f(x) then we can compute E_g[x] directly? Can you give an concrete example/illustration of a multivariate continuous/discrete case?

  • @peaelle42
    @peaelle42 5 หลายเดือนก่อน

    but what happens if i actually wanna sample from that difficult-to-sample distribution instead of computing things like expectation etc etc? like, i want the points themselves.

  • @zeeshan008x52
    @zeeshan008x52 5 ปีที่แล้ว

    you are a genius

  • @huxixi4120
    @huxixi4120 4 ปีที่แล้ว +5

    But how we get or calculate the ratio between f and g? the true distribution f is unknown right?

    • @alikassem812
      @alikassem812 3 ปีที่แล้ว

      As he explained, we have f(x) but we don't have g(x), so we will approximate it by sampling from other distribution which is h(x)/z. Then we will compute W

    • @thidmg
      @thidmg 3 ปีที่แล้ว +1

      @@alikassem812 i think we have g(x), but sometimes is very difficult to do the math of g(x), so we use importance sampling. In this case g(x) is simple, but in bayesian statistics in general is a very complex function

    • @alikassem812
      @alikassem812 3 ปีที่แล้ว

      @@thidmg yea, you are right. Thanks

    • @alexmtbful
      @alexmtbful ปีที่แล้ว

      @@thidmg agree- seems too easy and useless at the first look but I guess it's more a numerical issue why importance sampling has its right to exist and then it gets super useful

  • @distrologic2925
    @distrologic2925 2 ปีที่แล้ว

    at 9:18 there is an f(x) missing in the sum, isn't there? Because it is the expectation of f..?

  • @chenyang1896
    @chenyang1896 3 ปีที่แล้ว

    is there anybody knows the software's name which is the uploader was using?

    • @jaylenjames322
      @jaylenjames322 3 ปีที่แล้ว

      The part where he was showing the automatically plotting graphs is called Mathematica. It's made by Wolfram.

  • @lisaka2951
    @lisaka2951 4 ปีที่แล้ว

    Hi, I really enjoyed that video. But why is the expectation value of 1 always equal to 1?

    • @thidmg
      @thidmg 4 ปีที่แล้ว

      hi, the expectation of a constant is always that constant, "the constant is constant" it does not varies anytime, it's always that constant number, in this example is 1 but can be any constant number like 1, 2, 3, 4...

    • @lisaka2951
      @lisaka2951 4 ปีที่แล้ว

      @@thidmg Ohh.. thank you very much. That explanation did not come to my mind. Thank you and stay healthy!

  • @allenkalalu6006
    @allenkalalu6006 5 ปีที่แล้ว

    Hi! I am trying to work out model selection trough information criterion, please can you help in explaining the intuition behind Akaike Information criterion (AIC) also Bayesian Information criterion(BIC) and if you could start from Kullback Leibler divergence and how to derive AIC(or BIC) from it , and how AIC/BIC pick the best model,it will be deeply appreciate. Thanks in advance!!

  • @hossein_haeri
    @hossein_haeri 10 หลายเดือนก่อน

    You actually lost many people at 4:00 when you said "we only have access to the fair dice and somehow we want to work out the mean of the biased dice". Well... If we don't have access to the dice and it's probability distribution how do we even know what kind of dice are we dealing with? If we have its distribution then why are we bothering using the other ones samples???