Inverse Transform Sampling - VISUALLY EXPLAINED with EXAMPLES!

Sdílet
Vložit
  • čas přidán 29. 08. 2024
  • This tutorial explains the Inverse Transform Sampling using a simple example. The proof of why the algorithm/transform works is also explained.
    #sampling
    #statistics
    #distributions
  • Věda a technologie

Komentáře • 51

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

    Beautifully explained!! Inverse transform was such an abstract concept for me until now. Walking thru the proof is helping me grasp the concept so much better!

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

    I think you inverse « this is what we know » and « this is what we’re proving »
    Great and clear video. Thanks

  • @ohnekojian
    @ohnekojian Před 3 lety +4

    This is the best explanation with all the nice prepared visual on the very important idea of Inverse sampling. Thanks a million.

  • @GITARRobErt
    @GITARRobErt Před rokem +2

    Thank You a lot!!! This is the best presentation of the proof I have seen so far after watching a lot of other videos and papers about the universality of the uniform!! :)

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

    Thank you very much for great explanation. Clear and understandable video. The proof part was right in time too 🍾

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

    Very good! Thank you!!!

  • @hossainshaikhani1297
    @hossainshaikhani1297 Před 3 lety +1

    This was a clear and concise explanation of the method. Thank you.

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

    Wonderful, clear explanation! Thank you for sharing this video.

  • @ohnekojian
    @ohnekojian Před 3 lety +1

    這是我看過解釋得最好的講解。謝謝!

    • @KapilSachdeva
      @KapilSachdeva  Před 3 lety

      謝謝你的高評論。很高興能幫到你 🙏

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

    Amazing explanation!

  • @user-jz5fs3bi7s
    @user-jz5fs3bi7s Před 9 měsíci +1

    Excellent video with clear explanation. Thanks!

  • @mikenim9164
    @mikenim9164 Před rokem +1

    Bravo Bravo! This is absolutely fantastic! Thanks for sharing

  • @martinsanchez-hw4fi
    @martinsanchez-hw4fi Před rokem +1

    Good video. In Minute 10 you say cdf of Uniform is 1. That is for the pdf.

    • @KapilSachdeva
      @KapilSachdeva  Před rokem

      🙏 I think I say it is “y” when showing the proof.

  • @sudhagarraghavan9696
    @sudhagarraghavan9696 Před 3 lety +1

    Excellent ! Thank you!

  • @MDNQ-ud1ty
    @MDNQ-ud1ty Před 6 měsíci

    I was trying to prove that F_X(X) is U(0,1) from first principles. That is, without taking inverses. Seems to be a little harder than I thought ;/

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

    The statement at 9:53 doesn't seem right to me. If Y is a uniform on [0, 2], then the density at every point is 0.5 (since 0.5*2=1). The CDF evaluated at 1.5 is simply 1.5*(.5) = 0.75. But doesn't the statement at 9:53 state that the CDF evaluated at a point (1.5) should be equal to that point (1.5)?

    • @KapilSachdeva
      @KapilSachdeva  Před 2 lety

      The fault lies in my phrasing. I should have been consistent in saying "standard uniform distribution" and not just "uniform distribution".
      If you go to 5:50 you will notice that I mentioned that it is a standard uniform distribution.
      I am happy that you paid attention to this detail. Thanks!

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

    wonderfully explained!!

  • @Itay12353
    @Itay12353 Před rokem +1

    very good explanation thanks!

  • @blasttrash
    @blasttrash Před 9 měsíci

    is this better than box mueller or ziggurat algorithm in terms of speed while implementing in code?

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

    thank you . very useful

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

    Thank you so much. Can I know which program do you use for your present? Whats name of it?

  • @AhmedMohamed-dd4ef
    @AhmedMohamed-dd4ef Před 9 měsíci

    Question : Hi, i have rainfall data as a 2d matix/frame of the UK every 5 minutes so the data is spatially and temporarily correlated. The data has severely positive skewness. Around 90% of pixels or points are less than 10 and 10% between 10-128. When i train a cnn, it is only predict rainfall of low values because of the data imbalance. I would like to transform to uniform distribution. I tried log transformation which compressed the data but still there is imbalance. Do you know how to convert to a uniform distribution so all of the values have the same chance to be predicted? It is a regressio task to predict the next 12 frames of rainfall. The data is represented by only one continuous variable, rainfall intensity. Many thanks

    • @KapilSachdeva
      @KapilSachdeva  Před 9 měsíci

      Not sure about the approach/direction you are thinking in. May be think more in terms of data augmentation (if it is possible with you data). Other approach is to create balanced mini batches by over sampling the classes with less data. Yet another approach is to assign different weighting factor to thr loss contributed by different classes.

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

    great video. thanks

  • @armyman9907
    @armyman9907 Před 3 lety +1

    Excellent

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

    Still you didn’t explain the need of CPDF, also you told that we want to get rid of evaluating integral therefore we want something…? What CPDF , but CPDF is integral of pdf

  • @musiknation7218
    @musiknation7218 Před 2 lety

    Sir can you show this in R for simulation of samples

    • @KapilSachdeva
      @KapilSachdeva  Před 2 lety

      Am not well versed in R.
      I then searched for examples in R for you and found this great post that has the same example and few more.
      heds.nz/posts/inverse-transform/

  • @bodwiser100
    @bodwiser100 Před rokem

    Thanks. Could you explain what is "x" and what is "samples"?

    • @KapilSachdeva
      @KapilSachdeva  Před rokem

      Rajat, is it possible to may be elaborate a bit on your question? At the moment it is too generic and vague for me to provide any meaningful answer.

    • @bodwiser100
      @bodwiser100 Před rokem

      @@KapilSachdeva I mean what does the rectangle at 6:44 indicate? You said "samples are creating rectangle" I did not understand that. I know that uniform distribution looks like a rectangle where the x-axis indicates the value that our uniformly distribution random variable can take, and y-axis indicates the pdf for each of those values. But what does the rectangle at 6:44 indicate which has # of samples on x-axis and numbers 0 to 1 on y-axis

    • @KapilSachdeva
      @KapilSachdeva  Před rokem

      It is the histogram of samples. Since the entries plot starts to resemble a rectangle we can say that the samples are indeed coming from the uniform distribution.
      another way to say that when I generated samples I wanted to show that indeed they were sampled from uniform distribution.