(ML 14.10) Underflow and the log-sum-exp trick

Поделиться
HTML-код
  • Опубликовано: 17 окт 2024
  • How to avoid underflow (numbers too small to represent in a given computer language) in computations involving very small probabilities, by using the "log-sum-exp trick".

Комментарии • 9

  • @Ewerlopes
    @Ewerlopes 8 лет назад +2

    Can you recommend any good material for us to ready more about this trick? Book, tutorial, etc? Thanks for the video! Very good!

  • @samyu4473
    @samyu4473 4 года назад +2

    in the equation ...=b+log {sum {exp(ai-b) } }, what if you use b=min(ai) instead? since b is very negative, ai-b will be positive so underflow won't happen? for example log(exp(-20) + exp(-2)) = -20+log(1+exp(18)) and no underflow here

    • @Simon0725
      @Simon0725 3 года назад

      But if a_i are very big, positive numbers then doing b = max(a_i) prevents the overflow from happening.

  • @royzhou888
    @royzhou888 6 лет назад

    what drawing software do you use? I would also like to use it for my online class , thanks

  • @heheman3000
    @heheman3000 13 лет назад +1

    Why wouldn't we shift so that 0 is at halfway between the min and the max a_i? Is it because we only care about the largest one?

  • @apolorwang
    @apolorwang 13 лет назад +1

    A very beautiful trick! Thanks, man.

  • @JoshMilesVV
    @JoshMilesVV 4 года назад

    Great Video!

  • @dmit10
    @dmit10 13 лет назад

    Cool trick, I didn't know about it.

  • @WilliamWangYang
    @WilliamWangYang 12 лет назад +1

    really smart trick. Now at least we get a 'b'. ^^