Importance Sampling

The machine learning consultancy: truetheta.io
Want to work together? See here: truetheta.io/about/#want-to-w...
Calculating expectations is frequent task in Machine Learning. Monte Carlo methods are some of our most effective approaches to this problem, but they can suffer from high variance estimates. Importance Sampling is a clever technique to obtain lower variance estimates.
SOCIAL MEDIA
LinkedIn : / dj-rich-90b91753
Twitter : / duanejrich
Github: github.com/Duane321
Enjoy learning this way? Want me to make more videos? Consider supporting me on Patreon: / mutualinformation
SOURCES
[1] was my primary source. Chapter 17 of [2] and chapter 23 of [3] provided a useful discussion more directed at the use cases of Machine Learning.
-----------------------------
[1] E. Anderson, "Monte Carlo Methods and Importance Sampling", ib.berkeley.edu/labs/slatkin/...
[2] I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning, MIT Press, 2016
[3] K. P. Murphy. Machine Learning: A Probabilistic Perspective, MIT Press, 2012
TIMESTAMP
0:00 Intro
0:16 Monte Carlo Methods
2:29 Monte Carlo Example
3:57 Distribution of Monte Carlo Estimate
6:06 Importance Sampling
9:00 Importance Sampling Example
11:40 When to use Importance Sampling

Пікірлер: 221

  • @guilhermecorrea3604
    @guilhermecorrea36042 жыл бұрын

    I think people underestimate how good this channel is. Can't wait for it to blow up! Good job

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    lol I'm going with the slow and steady strategy

  • @nikoskonstantinou3681
    @nikoskonstantinou36812 жыл бұрын

    Im still confused.... why haven't you blown up yet?? Your content is levels higher than a lot of stuff in KZread!

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    lol I hear it takes time for the algorithm to like you. I'm not terribly worried. Slow and steady for now

  • @usptact
    @usptact3 күн бұрын

    Hallelujah! Finally got a simple explanation of what Importance Sampling is! Thanks a ton!

  • @slayerxyz0
    @slayerxyz010 ай бұрын

    One interesting use of importance sampling is in path tracing (similar to ray tracing) in computer graphics, since path tracing is a Monte-Carlo method for computing the rendering equation. You can use importance sampling to get a better (less noisy) image with the same number of samples by using a sampling distribution which provides more frequent samples where the contribution from the BRDF/BSDF is higher, essentially sampling fewer dim paths which don't contribute to the total lighting of a pixel.

  • @marcinelantkowski662
    @marcinelantkowski662 Жыл бұрын

    This must be the best explanation of importance sampling available online, or at least on YT. And this channel in general is such a gem. Can't wait for more of your content

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    Second donation ever! Thank you! And yes more is coming. I'm working on a big fat series, hence no recent vids. But they're coming

  • @pradkadambi
    @pradkadambi2 жыл бұрын

    The quality of these videos is always phenomenal.

  • @jobiquirobi123
    @jobiquirobi1232 жыл бұрын

    I like how you really go deep on uncommonly shown but very powerful techniques.

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    hell yea! Trying to make this for people who actually want to use this stuff one day. All these details become important.

  • @tolkienfan1972
    @tolkienfan19725 күн бұрын

    This was SSSOOOOOO much easier to understand than the wikipedia page! Thank you!

  • @mingtianni
    @mingtianni8 ай бұрын

    Such a beautiful talk! I was searching for an intro on importance sampling. And this is beyond my expectation. Thank you.

  • @natnaeldaba7317
    @natnaeldaba7317 Жыл бұрын

    The best explanation of Importance Sampling I've seen so far. Good job!!

  • @bernardosantosrocha6629
    @bernardosantosrocha66295 ай бұрын

    Just sending a thanks for the clarity of the graphs. painting the samples the color of the distribution is a great touch

  • @AlexG4MES
    @AlexG4MES2 жыл бұрын

    Every single word you say it's the absolute minimum for bestly conveying and explaining the full meaning of the formulas. Congratulations, and thank you for being an excellent teacher

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    Thanks a lot - glad you appreciate the script

  • @pjamshidian8
    @pjamshidian8 Жыл бұрын

    Fantastic video. It's clear that you put a massive amount of effort into your graphical representations and explanations!!

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    Yea I'm hoping that'll make the difference in the long run

  • @LuddeWessen
    @LuddeWessen2 жыл бұрын

    Somehow you manage to give intuition _and_ technical detail. Fantastic video, like all your other videos! 😎

  • @alexmtbful
    @alexmtbful Жыл бұрын

    Wow - this must have been a lot of work to do. A clear structure, so many details, theoretical knowledge as well as practical tips, astonishing/valuable graphics and super clear audio. Thank you!

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    You nailed it - it was a lot of work lol. Thanks for noticing :)

  • @_Mute_
    @_Mute_ Жыл бұрын

    You earned this sub. Fantastic quality! This is also the most intuitive explanation of a concept like this I've ever seen! I sometimes think other channels with similar topics either ramble a bit much or go too fast in parts and I get lost, but this is just the right amount of building the foundation slowly and confidently to arrive at the final idea. Keep going with these videos and you are sure to get algorithmed eventually 👍

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    Thank you very much! It's a work in progress too. I'm learning the rhythm and what does/doesn't need to be said. Things will get better and I'm sure it'll get recognized.

  • @sanjaythorat

    @sanjaythorat

    Жыл бұрын

    I second your opinion @Mute. Thanks @Mutual Information for the video.

  • @jeremywinston4447
    @jeremywinston44472 жыл бұрын

    This is how you suposed to make an explanation video. Very very clear and concise. Well scripted, well organized, keep up you great work!!

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    Ha yea the script is the hard part!

  • @wasifhaidersyed3813
    @wasifhaidersyed3813 Жыл бұрын

    Awesome! Keep it up, man! Your dedication is level is touching the 7th sky!

  • @kafaayari
    @kafaayari2 жыл бұрын

    Well I was trying to understand variational inference but with no luck. This gem helped to me. To be honest this is the best video on topic and this guy is a brilliant teacher. Please make more of this kind of videos.

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    Thanks! Variance inference will be covered one day - promise!

  • @user-ti1ke7zb4x
    @user-ti1ke7zb4x6 ай бұрын

    Amazing explanation. Top-notch delivery!

  • @apah
    @apahАй бұрын

    What an excellent explanation. Glad to see your latest video is performing well !

  • @tslau8022
    @tslau80222 жыл бұрын

    Among all the videos I've found on youtube about Importance Sampling., this video is so far the best explanation.

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    That's a win!

  • @Eric-jh5mp
    @Eric-jh5mp Жыл бұрын

    Wow that's an awesome explanation. I'm taking a Monte Carlo STATS class right now and this was far more clear then my professor was about what is actually happening here. Great video!

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    Happy to hear it Eric !

  • @yli6050
    @yli6050 Жыл бұрын

    Amazing visualization and lucid explanation ❤This was the kind of video that bring you joy of understanding, appreciate the beauty of math and people behind the original idea! Bring your favorite wine to watch this!

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    You're too kind Y Li - thank you!

  • @spyder5052
    @spyder505210 ай бұрын

    Like many others, I’m surprised you’re not bigger than you are! I’ve been binging your videos and they’re all very high quality. Liked and subbed 😊

  • @manolisnikolakakis7292
    @manolisnikolakakis7292 Жыл бұрын

    Thank you so much for this. A topic I considered very complex is now crystal clear thanks to you!

  • @shounakdesai4283
    @shounakdesai42834 ай бұрын

    great video. i bounced off from a lot of videos just for Importance sampling and this was the best of all.

  • @JesusRenero
    @JesusRenero Жыл бұрын

    Excellent explanation and video! Congratulations for that, and THANKS!

  • @062.jannatulferdausanu7
    @062.jannatulferdausanu73 ай бұрын

    This is the best video to understand importance sampling. Thank you❤

  • @wuchunricardo4846
    @wuchunricardo4846 Жыл бұрын

    My professor tells nothing about importance sampling, this clip really can help me to understand

  • @FlorentinoDing
    @FlorentinoDing5 ай бұрын

    I spent nearly two days to try to working this out and all you did just show me some figures, that's incredible, thanks!

  • @Mutual_Information

    @Mutual_Information

    5 ай бұрын

    My job is done ;)

  • @monuk4594
    @monuk4594 Жыл бұрын

    Loved the vid. Thanks a lot, and appreciate the effort that went into making this. Keep up the good work, and hoping for this channel to grow big.

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    Thank you - glad you like it!

  • @wendyqi4727
    @wendyqi4727 Жыл бұрын

    Omg, I struggled with these concepts for a while. Thank you so much for the explanation and visualization!

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    The struggle is over Wendy! Happy it helped :)

  • @covers3212
    @covers3212 Жыл бұрын

    impressive teaching skills, this was an amazing lesson

  • @joaofrancisco8864
    @joaofrancisco88647 ай бұрын

    That is absurdly well-explained. Very high quality in the every aspect of the video!

  • @Mutual_Information

    @Mutual_Information

    7 ай бұрын

    Thank you - more good stuff coming!

  • @migueliglesiasalcazar8334
    @migueliglesiasalcazar83345 ай бұрын

    Absolutely great video. Keep making this kind of content please. It is very helpful!

  • @CYQ-sg2yu
    @CYQ-sg2yu4 ай бұрын

    Very professional explanation on every detail of IS!

  • @Recessio
    @RecessioАй бұрын

    This is THE best explanation of importance sampling I have come across. I'm studying for a PhD in Astrophysics, I've been linked to so many textbooks and college courses that make it really confusing. This was so simple and has really helped me understand this and move on to further topics. Thank you so much!

  • @Mutual_Information

    @Mutual_Information

    Ай бұрын

    Thank you for telling me - I love hearing about those cases where this stuff hits just right!

  • @Siroitin
    @Siroitin2 ай бұрын

    This channel is so haunting. It's like no matter what I search, this channel always returns

  • @ruslansergeev4061
    @ruslansergeev40617 ай бұрын

    An absolute phenomenon 💪💪💪 Beautiful explanation.

  • @tobiasopsahl6163
    @tobiasopsahl61632 жыл бұрын

    Excellent video! I find myself lost in graduate statistic books, since they often explain concepts like this based on a lot of other statistical concepts, that I do not always have a good understanding for. It certainly helped to broaden the perspective a bit. It is easy to find excellent recourses on the most common and hyped methods, but not important but often overlooked topics like this. Thanks!

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    Thank you that's a big point of the channel. All the basic topics get covered at a high quality level, but there's clearly a real appetite for a few steps beyond it.

  • @stijnh1974
    @stijnh1974 Жыл бұрын

    Thank you very much for the great intuition on this technique ! I am using it to understand the SMC algorithm, where Importance Sampling is a key ingredient.

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    Excellent, glad it helps

  • @stergiosbachoumas2476
    @stergiosbachoumas2476 Жыл бұрын

    That was actually a very nice way of presenting Importance Sampling. Thank you!

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    Glad you liked it and thanks for watching ;)

  • @jacoblynd2808
    @jacoblynd28088 ай бұрын

    Fantastic video! I'm giving an internal lit review on quasi-adiabatic path integrals and this really helped me get some perspective on the core of the method! Super clear lecture and great use of visuals! Thank you so much!

  • @Mutual_Information

    @Mutual_Information

    8 ай бұрын

    Excellent, glad it helped!

  • @tylernardone3788
    @tylernardone37882 жыл бұрын

    Outstanding as always. Really a standout in this space. Thanks!

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    Thanks Tyler, the appreciation goes a long way

  • @zuhair95
    @zuhair952 жыл бұрын

    OMG, YOU SAVE MY excessive thoughts about how to handle the theoretical side in the practical side (in Particle filter - based SLAM algorithms for probabilistic mobile robotics systems) . Many thanks.

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    excellent! Glad I could help

  • @jakob6628
    @jakob6628 Жыл бұрын

    Exceptional explanation! Thank's a ton!

  • @mdnafi3650
    @mdnafi36503 ай бұрын

    Man ! I wish you I could learn real time analysis from you !! Superb !!!

  • @aliasziken7847
    @aliasziken7847 Жыл бұрын

    high quality, excellent tutorial, thx

  • @jessicasumargo6547
    @jessicasumargo654711 ай бұрын

    thanks for making statistics feel comprehensible for me

  • @ArnaldurBjarnason
    @ArnaldurBjarnason11 ай бұрын

    I stumbled upon your kelly criterion video some time ago and liked it. Now, properly looking at your channel, I'm blown away. Really high quality explanations (props to the usage of manim as well) of hard to understand ideas 👏👏👏

  • @Mutual_Information

    @Mutual_Information

    11 ай бұрын

    Oh yea, the quality is improving. Took me a long time but I think I'm getting the essentials. I'm also not using Manim.. maybe I should but I've always wanted to build something bespoke for this.

  • @BehrouzMousavi
    @BehrouzMousavi5 күн бұрын

    Perfect intro. Please share more of the available methods over finding q(x)!

  • @iloraishaque2594
    @iloraishaque2594 Жыл бұрын

    Fantastic explanation , thank you

  • @draggerkung4847
    @draggerkung48472 жыл бұрын

    Thank you. It's very clear.

  • @flooreijkelboom1693
    @flooreijkelboom1693 Жыл бұрын

    Amazing video, thank you for this.

  • @DamoOne
    @DamoOne2 жыл бұрын

    Excellent work, thanks!

  • @raphaelbaur4335
    @raphaelbaur4335 Жыл бұрын

    Wonderful animations!

  • @pierre_laur
    @pierre_laur Жыл бұрын

    Fantastic explanation, thanks !

  • @posthocprior
    @posthocprior Жыл бұрын

    A good explanation. Thanks.

  • @samsonyu5679
    @samsonyu5679 Жыл бұрын

    Very useful, the intuition, visualizations and math have a nice combined flow!

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    Thanks Samson - glad you liked it. Come back anytime ;)

  • @Arkantosi
    @Arkantosi11 ай бұрын

    Great channel! Lucky I found this. I like the quality of the presentation and the LaTeX math displayed. Well done sir!

  • @Mutual_Information

    @Mutual_Information

    11 ай бұрын

    I'm for the people who think Latex looks beautiful

  • @sunilmathew2914
    @sunilmathew2914 Жыл бұрын

    Great video. Really liked the visualizations.

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    Thanking me dollars - thank you very much!

  • @wqwq2024
    @wqwq20242 ай бұрын

    Excellent job. Thank you!

  • @vaek_54
    @vaek_54 Жыл бұрын

    Nice video, thank you ! The last condition for "When is Important Sampling used" is a sufficient condition for the use of IS rather than a necessary condition in my opinion. In Reinforcement Learning we try to evaluate values (the f(x)) for a target policy (the p(x)) using a sampling policy (the q(x)). It is used because using p is not sample efficient as it only can be used with recently sampled data. Using q allows us to make use of the all data sampled since the beginning of the training. But we are not at all choosing q to be high where |pf| is.

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    !! It's wild you mentioned that. I actually made this vid as a pre-req to my RL sequence. Yes! The IS case I mentioned here is not the full story. I tried to allude to that a bit in the intro :)

  • @caedknight1218
    @caedknight12182 жыл бұрын

    excellent as always.

  • @BilalTaskin-om6il
    @BilalTaskin-om6il9 ай бұрын

    Thank you. Great video.

  • @cwaddle
    @cwaddle11 ай бұрын

    Great intuitive recap of jensens inequality,!

  • @jameshimelic4454
    @jameshimelic4454 Жыл бұрын

    this is a great video. thank you!

  • @welcomeaioverlords
    @welcomeaioverlords2 жыл бұрын

    Well done! And thank you.

  • @pietro8674
    @pietro86742 жыл бұрын

    Amazing video!

  • @123ming1231
    @123ming1231 Жыл бұрын

    I subscribe the channel because of this video, the quality is insane

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    Thank you Ming ;)

  • @yodarocco
    @yodarocco Жыл бұрын

    I think this is the kind of video that you have to look when you already have more or less idea of what the algorithm does, and then it helps you to summarize and understand better.

  • @grahamjoss4643
    @grahamjoss46432 жыл бұрын

    thanks for sharing. I'm an undergrad CS student and this was cool

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    Glad it helped - there's plenty more to come!

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    Also, if this topic is covered any of your classes.. I would greatly appreciate the favor of sharing this vid with the class :)

  • @ZarakJamalMirdadKhan
    @ZarakJamalMirdadKhan2 жыл бұрын

    Very informative channel

  • @1ssbrudra
    @1ssbrudra8 ай бұрын

    This is exceptionally well explained. Just one suggestion, when explaining remove yourself when going down the analytical steps and bring yourself back. Grabs attention instantly.

  • @Mutual_Information

    @Mutual_Information

    8 ай бұрын

    Smart idea, I'll try that. Seriously, you'll see in the next vid, thanks!

  • @RahmanIITDelhi
    @RahmanIITDelhi2 жыл бұрын

    One of the best explanation so far i have seen....If you can show how we can code it in python that would be helpfull......Thanks...

  • @lenoken7894
    @lenoken7894 Жыл бұрын

    Great video ❤

  • @pepinzachary
    @pepinzachary10 күн бұрын

    Fantastic video, well done! I'm watching for path tracing rather than ML :)

  • @djfl58mdlwqlf
    @djfl58mdlwqlf2 жыл бұрын

    great to see you again I have no idea why your video has such a low view... This deserves millions

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    lol thank you, we'll see! millions is a very very high bar for technical stuff. I'm happy with a lot less

  • @MeshRoun
    @MeshRoun2 жыл бұрын

    I think what I like the most about your videos is the reference book by your right, always showing up :) Do you have a complete list of your recommended/favorite books?

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    lol you noticed! Yea these textbooks are essential :) I think one day I'll put together a list of my favorites. I can tell you a few of them here: Machine Learning: A Probabilistic Perspective is definitely my number 1. There's actually a new edition available for pre-order on Kevin Murphy's site. Second would be The Elements of Statistical Learning, a classic. Then Deep Learning by Bengio et al. And, just because I'm reading it right now, I really love Reinforcement Learning by Sutton and Barto. It does a great job creating a unifying framework on a wide and rapidly evolving field.

  • @olofjosefsson4424
    @olofjosefsson4424 Жыл бұрын

    Great video! If I would like to add anything it would be maybe 2-3 questions in the end of the presented material to see if you did grasp the key points in the video (with answers in the description)! Thank you

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    That's.. a good idea. OK I think I'll give that a shot in future video.. I need some ways to build interaction with the audience. Thanks!

  • @andblom
    @andblomАй бұрын

    Well explained!

  • @dexio85
    @dexio85 Жыл бұрын

    Those topics are widely used in computer graphics but they are explained in such a convoluted way. For example I only understood what "unbiased" means with your explanation. You do have a tallent to explain things!

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    Thank you RexDex!

  • @konn81
    @konn814 ай бұрын

    excellent explanation

  • @jacksonchen8679
    @jacksonchen8679 Жыл бұрын

    Thank you.

  • @user-if3xm4fz3h
    @user-if3xm4fz3h2 жыл бұрын

    That's a great video which helps me alot! Could you please also introduce a little bit about Resampled Importance Sampling (RIS)? Thank you so much

  • @saraheslami7795
    @saraheslami77956 ай бұрын

    Awesome visualizations!

  • @Mutual_Information

    @Mutual_Information

    6 ай бұрын

    Thank you Sarah!

  • @kimyongtan3818
    @kimyongtan38187 ай бұрын

    Super clear!

  • @taegyunlim2657
    @taegyunlim2657 Жыл бұрын

    Thanks that was super helpful!!!

  • @Mutual_Information

    @Mutual_Information

    Жыл бұрын

    Mission accomplished!

  • @mistertheguy3073
    @mistertheguy307310 ай бұрын

    Wow this is great!

  • @avishkarsaha8506
    @avishkarsaha85062 жыл бұрын

    god these videos are invaluable

  • @Counter930
    @Counter9302 жыл бұрын

    Hey, I'm blown away by your visulizations, what do you make them in? BTW your vid on prob. distributions helped me in my stats class :D thanks!

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    Happy to help!

  • @oscarriddleus
    @oscarriddleus2 жыл бұрын

    very nice lecture!thanks,i am just about to give a presentation about sampling and that covers the IS, very great and inspiring video👍

  • @Mutual_Information

    @Mutual_Information

    2 жыл бұрын

    Nice, glad it helped :)

  • @BillHaug
    @BillHaug8 ай бұрын

    Thank you

  • @jeroenritmeester73
    @jeroenritmeester739 ай бұрын

    I think the pace of this video is great, but I missed the motivation for this up until the very end. The why should generally come first: "why do I need this explanation?"

  • @cziffras9114
    @cziffras911411 күн бұрын

    Now the true question is: how can one be clearer than that? Wonderful work, thank you so much

  • @outtaspacetime
    @outtaspacetime2 жыл бұрын

    brilliant!

  • @user-kn4wt
    @user-kn4wt2 жыл бұрын

    awesome!

  • @daniellandes2014
    @daniellandes2014Ай бұрын

    I tip my hat, thank you for this

  • @Throwingness
    @Throwingness2 жыл бұрын

    Somehow I am able to follow this.