Video není dostupné.
Omlouváme se.

Importance Sampling

Sdílet
Vložit
  • čas přidán 15. 08. 2024
  • The machine learning consultancy: truetheta.io
    Join my email list to get educational and useful articles (and nothing else!): mailchi.mp/tru...
    Want to work together? See here: truetheta.io/a...
    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/Dua...
    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.ed...
    [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

Komentáře • 230

  • @guilhermecorrea3604
    @guilhermecorrea3604 Před 2 lety +98

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

  • @marcinelantkowski662
    @marcinelantkowski662 Před 2 lety +48

    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  Před 2 lety +3

      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
    @pradkadambi Před 2 lety +34

    The quality of these videos is always phenomenal.

  • @nikoskonstantinou3681
    @nikoskonstantinou3681 Před 2 lety +45

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

    • @Mutual_Information
      @Mutual_Information  Před 2 lety +10

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

  • @slayerxyz0
    @slayerxyz0 Před rokem +13

    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.

  • @jobiquirobi123
    @jobiquirobi123 Před 2 lety +14

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

    • @Mutual_Information
      @Mutual_Information  Před 2 lety +1

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

  • @usptact
    @usptact Před 2 měsíci +2

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

  • @AlexG4MES
    @AlexG4MES Před 2 lety +4

    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

  • @yehiamoustafa9801
    @yehiamoustafa9801 Před měsícem +1

    best explanation of importance sampling i have found , thanks alot

  • @bernardosantosrocha6629
    @bernardosantosrocha6629 Před 8 měsíci +2

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

  • @pjamshidian8
    @pjamshidian8 Před rokem +8

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

  • @Recessio
    @Recessio Před 3 měsíci +1

    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  Před 3 měsíci +1

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

  • @jeremywinston4447
    @jeremywinston4447 Před 2 lety +4

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

  • @kafaayari
    @kafaayari Před 2 lety +3

    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.

  • @Eric-jh5mp
    @Eric-jh5mp Před rokem +2

    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!

  • @_Mute_
    @_Mute_ Před 2 lety +8

    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  Před 2 lety +1

      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 Před rokem

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

  • @wuchunricardo4846
    @wuchunricardo4846 Před rokem +1

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

  • @mingtianni
    @mingtianni Před 10 měsíci +1

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

  • @1ssbrudra
    @1ssbrudra Před 10 měsíci +1

    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  Před 10 měsíci

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

  • @tobiasopsahl6163
    @tobiasopsahl6163 Před 2 lety +4

    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  Před 2 lety +3

      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.

  • @FlorentinoDing
    @FlorentinoDing Před 7 měsíci +1

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

  • @CYQ-sg2yu
    @CYQ-sg2yu Před 7 měsíci +1

    Very professional explanation on every detail of IS!

  • @jessicasumargo6547
    @jessicasumargo6547 Před rokem +1

    thanks for making statistics feel comprehensible for me

  • @yli6050
    @yli6050 Před rokem +3

    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!

  • @vaek_54
    @vaek_54 Před 2 lety +3

    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  Před 2 lety +1

      !! 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 :)

  • @apah
    @apah Před 3 měsíci

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

  • @stijnh1974
    @stijnh1974 Před rokem +1

    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.

  • @natnaeldaba7317
    @natnaeldaba7317 Před rokem +1

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

  • @Siroitin
    @Siroitin Před 4 měsíci

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

  • @tolkienfan1972
    @tolkienfan1972 Před 2 měsíci

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

  • @yodarocco
    @yodarocco Před rokem +1

    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.

  • @tslau8022
    @tslau8022 Před 2 lety

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

  • @grahamjoss4643
    @grahamjoss4643 Před 2 lety +3

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

    • @Mutual_Information
      @Mutual_Information  Před 2 lety

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

    • @Mutual_Information
      @Mutual_Information  Před 2 lety +2

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

  • @alexmtbful
    @alexmtbful Před rokem +1

    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  Před rokem +1

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

  • @zuhair95
    @zuhair95 Před 2 lety +1

    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.

  • @123ming1231
    @123ming1231 Před rokem +1

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

  • @BehrouzMousavi
    @BehrouzMousavi Před 2 měsíci

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

  • @jiangpengli86
    @jiangpengli86 Před měsícem +1

    Thank you for this fantastic tutorial video. It really helps a lot.

  • @jacoblynd2808
    @jacoblynd2808 Před 10 měsíci

    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!

  • @joaofrancisco8864
    @joaofrancisco8864 Před 9 měsíci +1

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

  • @LuddeWessen
    @LuddeWessen Před 2 lety +2

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

  • @shounakdesai4283
    @shounakdesai4283 Před 6 měsíci +1

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

  • @jeroenritmeester73
    @jeroenritmeester73 Před rokem +1

    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?"

  • @062.jannatulferdausanu7
    @062.jannatulferdausanu7 Před 6 měsíci +1

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

  • @spyder5052
    @spyder5052 Před rokem +1

    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 😊

  • @dexio85
    @dexio85 Před rokem +1

    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!

  • @wendyqi4727
    @wendyqi4727 Před rokem +1

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

  • @stergiosbachoumas2476
    @stergiosbachoumas2476 Před rokem +1

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

  • @cwaddle
    @cwaddle Před rokem +1

    Great intuitive recap of jensens inequality,!

  • @ArnaldurBjarnason
    @ArnaldurBjarnason Před rokem +1

    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  Před rokem

      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.

  • @manolisnikolakakis7292
    @manolisnikolakakis7292 Před rokem +1

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

  • @olofjosefsson4424
    @olofjosefsson4424 Před rokem +1

    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  Před rokem +1

      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!

  • @mdnafi3650
    @mdnafi3650 Před 5 měsíci +1

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

  • @aliasziken7847
    @aliasziken7847 Před rokem +1

    high quality, excellent tutorial, thx

  • @wasifhaidersyed3813
    @wasifhaidersyed3813 Před 2 lety +1

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

  • @pepinzachary
    @pepinzachary Před 2 měsíci +1

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

  • @user-ti1ke7zb4x
    @user-ti1ke7zb4x Před 8 měsíci +1

    Amazing explanation. Top-notch delivery!

  • @ruslansergeev4061
    @ruslansergeev4061 Před 10 měsíci +1

    An absolute phenomenon 💪💪💪
    Beautiful explanation.

  • @sunilmathew2914
    @sunilmathew2914 Před rokem +1

    Great video. Really liked the visualizations.

  • @iloraishaque2594
    @iloraishaque2594 Před rokem +1

    Fantastic explanation , thank you

  • @covers3212
    @covers3212 Před rokem +1

    impressive teaching skills, this was an amazing lesson

  • @djfl58mdlwqlf
    @djfl58mdlwqlf Před 2 lety +1

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

    • @Mutual_Information
      @Mutual_Information  Před 2 lety

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

  • @posthocprior
    @posthocprior Před rokem +1

    A good explanation. Thanks.

  • @hw5622
    @hw5622 Před rokem +1

    Nice video! Thank you for the succinct explanation for a first understanding !

  • @monuk4594
    @monuk4594 Před rokem +1

    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.

  • @sjpbrooklyn7699
    @sjpbrooklyn7699 Před 5 měsíci

    You said: “The dimension of x is high ... This integral is impossible to calculate exactly ... A small set of samples have an outsize impact on the average.” This describes my doctoral dissertation problem in polymer chemistry. I wanted to determine average thermodynamic properties of a desirable variable like the end to end distance or radius of gyration (average distance of molecular units from center of mass) of a very long polymer molecule of, say, several thousand units. In thermodynamics this is the integral of [the end-to-end distance times exp(-U/kt)d(tau)] where U is energy, t is temperature, and k is Boltzmann’s constant, divided by the integral of (exp-U/kt)d(tau), also called the partition function. Tau is the volume element of the phase space for the molecule and represents all possible geometric conformations or shapes of the molecule. The conformation of the polymer is completely defined geometrically by listing the dihedral angles about successive backbone atoms from one end to the other (ignoring side chains for simplicity). Given such a list, you can generate all of the molecule’s coordinates in three dimensions, from which you can then calculate the energy of the molecule, U, using any number of standard chemical functions. Each of the dihedral angles can vary continuously from 0 to 2pi. The multi-dimensional “phase space” defined by tau is unwieldy because tiny changes in any dihedral angle can bring distant atoms together in energetically unpredictable ways and there is no analytical solution to the integral. In the 1950s Monte Carlo methods were used to generate coordinates for a single polymer molecule by using a random number generator to create a list of dihedral angles and then calculating (a) the end-to-end distance of the polymer whose angles corresponded to the list and (b) its energy. In a single computer “experiment” researchers could generate thousands of polymers and calculate the average end-to-end distance using the exponential function as the weighting function. In principle, this worked, but in practice, polymers with very high energies due to atomic overlaps and therefore very low weights dominated the outputs so the averages converged too slowly to be useful. In the 1960s Moti Lal, a chemist at Unilever Labs in the UK, became aware of Metropolis’s seminal paper from 1953 in the Journal of Chemical Physics that laid out the statistical ideas of importance sampling and applied them to the polymer problem. However, the available computing power (IBM 360/50) confined his polymers to 30 monomer units on a 2-dimensional spatial lattice. As a graduate student at NYU 1968 I had access to a Control Data Corp. CDC 6600 supercomputer at the Courant Institute and used the Metropolis-Lal method to generate more realistic polymers in 3 dimensions with free rotation about their backbone bonds (i.e., not restricted to an artificial lattice). Just as you pointed out, samples generated with this method tended to represent more “important” regions of polymer conformation space so it took fewer samples to get stable averages. This allowed me to also generate the numerical distributions of end-to-end distances of polymers of several hundred units and with sufficient accuracy to determine which of a number of theoretical analytic functions best described those distributions.

  • @cziffras9114
    @cziffras9114 Před 2 měsíci

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

  • @migueliglesiasalcazar8334
    @migueliglesiasalcazar8334 Před 7 měsíci +1

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

  • @geraltofrivia9424
    @geraltofrivia9424 Před 11 měsíci +1

    The CLT is one of the wonders of the universe.

  • @kirar2004
    @kirar2004 Před 5 dny

    Very clear explanation! Thanks!

  • @wqwq2024
    @wqwq2024 Před 4 měsíci +1

    Excellent job. Thank you!

  • @draggerkung4847
    @draggerkung4847 Před 2 lety +1

    Thank you. It's very clear.

  • @samsonyu5679
    @samsonyu5679 Před rokem +1

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

  • @flooreijkelboom1693
    @flooreijkelboom1693 Před rokem +1

    Amazing video, thank you for this.

  • @Arkantosi
    @Arkantosi Před rokem +1

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

  • @raphaelbaur4335
    @raphaelbaur4335 Před rokem +1

    Wonderful animations!

  • @caedknight1218
    @caedknight1218 Před 2 lety +1

    excellent as always.

  • @BilalTaskin-om6il
    @BilalTaskin-om6il Před 11 měsíci +1

    Thank you. Great video.

  • @avishkarsaha8506
    @avishkarsaha8506 Před 2 lety +1

    god these videos are invaluable

  • @ZarakJamalMirdadKhan
    @ZarakJamalMirdadKhan Před 2 lety +1

    Very informative channel

  • @jameshimelic4454
    @jameshimelic4454 Před rokem +1

    this is a great video. thank you!

  • @jakob6628
    @jakob6628 Před rokem +1

    Exceptional explanation! Thank's a ton!

  • @daniellandes2014
    @daniellandes2014 Před 3 měsíci +1

    I tip my hat, thank you for this

  • @konn81
    @konn81 Před 7 měsíci +1

    excellent explanation

  • @RahmanIITDelhi
    @RahmanIITDelhi Před 2 lety +1

    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...

  • @saraheslami7795
    @saraheslami7795 Před 8 měsíci +1

    Awesome visualizations!

  • @tylernardone3788
    @tylernardone3788 Před 2 lety

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

  • @lenoken7894
    @lenoken7894 Před rokem +2

    Great video ❤

  • @Throwingness
    @Throwingness Před 2 lety +1

    Somehow I am able to follow this.

  • @jacksonchen8679
    @jacksonchen8679 Před rokem +1

    Thank you.

  • @kimyongtan3818
    @kimyongtan3818 Před 10 měsíci +1

    Super clear!

  • @minhtriet6873
    @minhtriet6873 Před 2 lety

    no discuss about qquality of this video, very incredible!

  • @pietro8674
    @pietro8674 Před 2 lety +1

    Amazing video!

  • @welcomeaioverlords
    @welcomeaioverlords Před 2 lety +1

    Well done! And thank you.

  • @istvanszennai5209
    @istvanszennai5209 Před rokem

    The way I would've explained it is a little different/simpler. Gonna refer to the Monte Carlo section.
    First of all the goal is to calculate the integral of f, not f*p.
    The equation is true, but it describes the expected value of f when x comes from the density function p (law of the unconscious statistician).
    Now in order to get the integral of f we define an estimator F_N such that:
    F_N = \frac{1}{N} \sum_{i=1}^N \frac{f(x_i)}{p(x_i)}
    and by the properties of the expected value it's easy to show that
    E[F_N] = \int_D f(x) \, \mathrm{d}x
    (never forget the domain of the integration!)
    Now what importance sampling really means is to choose the density function in a way that it cancels out f's dominant parts.
    Your explanation is okay-ish on that, however I miss that you didn't mention (or indirectly mentioned), that the p (or q in your example) must be a density function (that is it has to integrate to 1 on the domain) and its cumulative distribution function must be invertible.
    Here is a concrete example I used in my article:
    www.desmos.com/calculator/wce71zcie1?fbclid=IwAR2NKyeFsif2-XMXPifCVOa6k9dZRAE6Lzq7W6F5TwQyJZyiG2jng8mMKPQ
    (I'm using the letter q for the inverse cumulative distribution function)

  • @andblom
    @andblom Před 3 měsíci +1

    Well explained!

  • @pierre_laur
    @pierre_laur Před 2 lety +1

    Fantastic explanation, thanks !

  • @BillHaug
    @BillHaug Před 10 měsíci +1

    Thank you

  • @DamoOne
    @DamoOne Před 2 lety +1

    Excellent work, thanks!

  • @taegyunlim2657
    @taegyunlim2657 Před rokem +1

    Thanks that was super helpful!!!