Bayes is BAE

Bayes is BAE

Before programming, before formal probability there was Bayes. He introduced the notion that multiple uncertain estimates which are related could be combined to form a more certain estimate. It turns out that this extremely simple idea has a profound impact on how we write programs and how we can think about life. The applications range from machine learning and robotics to determining cancer treatments. In this talk we'll take an in depth look at Bayses rule and how it can be applied to solve problems in programming and beyond.

Db953d125f5cc49756edb6149f1b813e?s=128

Richard Schneeman

May 08, 2017
Tweet

Transcript

  1. 1.
  2. 3.
  3. 5.
  4. 6.
  5. 7.
  6. 8.
  7. 9.
  8. 10.
  9. 11.

    Divine Benevolence, or an Attempt to Prove That the Principal

    End of the Divine Providence and Government is the Happiness of His Creatures
  10. 12.

    &

  11. 13.

    An Introduction to the Doctrine of Fluxions, and a Defence

    of the Mathematicians Against the Objections of the Author of The Analyst
  12. 16.
  13. 17.
  14. 18.
  15. 19.
  16. 20.
  17. 21.
  18. 22.
  19. 23.
  20. 24.

    No

  21. 25.
  22. 26.
  23. 27.
  24. 34.
  25. 35.
  26. 37.

    SSL

  27. 38.
  28. 41.
  29. 42.
  30. 43.
  31. 44.
  32. 45.
  33. 46.
  34. 47.
  35. 55.
  36. 56.
  37. 57.
  38. 58.
  39. 59.
  40. 60.
  41. 61.
  42. 63.
  43. 64.
  44. 65.
  45. 69.
  46. 70.
  47. 71.
  48. 73.
  49. 74.
  50. 75.
  51. 76.
  52. 83.

    P(B) = H H H T probability of heads P(B)

    = 0.5 * 0.5 + 0.5 * 1 0.75 P(B) =
  53. 85.

    P(A) = P(A ∣ B) = P(B ∣ A) P(A)

    P(B) 0.75 probability of $3.7 million
  54. 89.

    P(A ∣ B) = P(B ∣ A) P(A) P(B) P(B

    ∣ A) = 0.75 0.50 probability of heads given $3.7
  55. 91.

    P(B ∣ A) = 0.5 P(A ∣ B) = P(B

    ∣ A) P(A) P(B) 0.75 0.5 * 0.5
  56. 92.

    $3.7 mil given Heads P(A ∣ B) = P(B ∣

    A) P(A) P(B) 0.75 0.5 * 0.5 P(A ∣ B) = 1 3 = 0.3333
  57. 99.

    P(Ai ∣ B) = P(B ∣ Ai ) P(Ai )

    ∑ j P(B ∣ Aj ) P(Aj )
  58. 100.

    P(A ∣ B) = P(B ∣ A) P(A) P(B) P(Ai

    ∣ B) = P(B ∣ Ai ) P(Ai ) ∑ j P(B ∣ Aj ) P(Aj )
  59. 108.

    P(Hea d s) = P(Hea d s ∣ $$$)P($$$) +

    P(Hea d s ∣ $0)P($0) $3.7 mil $0 Heads Tails
  60. 109.

    $3.7 mil $0 P(Hea d s) = P(Hea d s

    ∣ $$$)P($$$) + P(Hea d s ∣ $0)P($0) Heads Tails
  61. 110.
  62. 111.

    P(B) = H H H T probability of heads P(B)

    = 0.5 * 0.5 + 0.5 * 1 0.75 P(B) =
  63. 112.

    P(B) = ∑ j P(B ∣ Aj ) P(Aj )

    P(Hea d s) = P(Hea d s ∣ $$$)P($$$) + P(Hea d s ∣ $0)P($0) Total Probability
  64. 114.

    P(Ai ∣ B) = P(B ∣ Ai ) P(Ai )

    ∑ j P(B ∣ Aj ) P(Aj )
  65. 115.

    P(Coini ∣ HH ) = P(HH ∣ Coini ) P(Coini

    ) ∑ j P(HH ∣ Coinj ) P(Coinj )
  66. 116.

    P(Coini ∣ HH ) = P(HH ∣ Coini ) P(Coini

    ) ∑ j P(HH ∣ Coinj ) P(Coinj ) P(HH ∣ Coini ) = 0.5 * 0.5
  67. 117.

    P(Coini ∣ HH ) = P(HH ∣ Coini ) P(Coini

    ) ∑ j P(HH ∣ Coinj ) P(Coinj ) 0.5 P(Coini ) =
  68. 118.

    P(Coini ∣ HH ) = P(HH ∣ Coini ) P(Coini

    ) ∑ j P(HH ∣ Coinj ) P(Coinj ) ∑ j P(B ∣ Aj ) P(Aj ) = P(HH ∣ $$$)P($$$) + P(HH ∣ $0)P($0) ∑ j P(B ∣ Aj ) P(Aj ) = 0.25(0.5) + 1.0(0.5)
  69. 119.

    P(Coini ∣ HH ) = P(HH ∣ Coini ) P(Coini

    ) ∑ j P(HH ∣ Coinj ) P(Coinj ) ∑ j P(B ∣ Aj ) P(Aj ) = P(HH ∣ $$$)P($$$) + P(HH ∣ $0)P($0) ∑ j P(B ∣ Aj ) P(Aj ) = 0.25(0.5) + 1.0(0.5)
  70. 120.

    P(Coin$$$ ∣ HH ) = 0.25(0.5) 0.625 = 1 5

    = 0.2 P(Coini ∣ HH ) = P(HH ∣ Coini ) P(Coini ) ∑ j P(HH ∣ Coinj ) P(Coinj )
  71. 121.

    P(Coin$$$ ∣ HH ) = 0.25(0.5) 0.625 = 1 5

    = 0.2 P(Coini ∣ HH ) = P(HH ∣ Coini ) P(Coini ) ∑ j P(HH ∣ Coinj ) P(Coinj )
  72. 122.

    P(Coini ∣ HH ) = 0.25(0.5) 0.625 = 1 5

    = 0.2 P(Coini ∣ HH ) = P(HH ∣ Coini ) P(Coini ) ∑ j P(HH ∣ Coinj ) P(Coinj )
  73. 127.

    P(A ∣ B) = P(B ∣ A) P(A) P(B) P(Ai

    ∣ B) = P(B ∣ Ai ) P(B) P(Ai )
  74. 133.
  75. 137.
  76. 142.

    for k in range(10): measure = measure_array[k] # Predict x_guess

    = a * x_guess p = a * p * a # Update gain = p / (p + r) x_guess = x_guess + gain * (measure - x_guess)
  77. 143.

    for k in range(10): measure = measure_array[k] # Predict x_guess

    = a * x_guess p = a * p * a # Update gain = p / (p + r) x_guess = x_guess + gain * (measure - x_guess) Low Predict Error, low gain
  78. 144.

    for k in range(10): measure = measure_array[k] # Predict x_guess

    = a * x_guess p = a * p * a # Update gain = p / (p + r) x_guess = x_guess + 0 * (measure - x_guess) Low Predict Error, low gain
  79. 145.

    for k in range(10): measure = measure_array[k] # Predict x_guess

    = a * x_guess p = a * p * a # Update gain = p / (p + r) x_guess = x_guess + 0 * (measure - x_guess) Low Predict Error, low gain
  80. 146.

    for k in range(10): measure = measure_array[k] # Predict x_guess

    = a * x_guess p = a * p * a # Update gain = p / (p + r) x_guess = x_guess + 1 * (measure - x_guess) High Predict Error, High gain
  81. 147.

    for k in range(10): measure = measure_array[k] # Predict x_guess

    = a * x_guess p = a * p * a # Update gain = p / (p + r) x_guess = x_guess + 1 * (measure - x_guess) High Predict Error, High gain
  82. 150.

    for k in range(10): measure = measure_array[k] # Predict x_guess

    = a * x_guess p = a * p * a # Update gain = p / (p + r) x_guess = x_guess + gain * (measure - x_guess) p = (1 - g) * p
  83. 151.
  84. 152.
  85. 153.
  86. 154.
  87. 155.
  88. 156.
  89. 157.
  90. 159.
  91. 161.
  92. 162.
  93. 163.
  94. 164.
  95. 165.
  96. 166.
  97. 167.
  98. 168.
  99. 175.

    BAE

  100. 176.

    BAE

  101. 177.

    BAE

  102. 178.

    BAE

  103. 179.
  104. 180.
  105. 181.
  106. 184.
  107. 185.
  108. 186.
  109. 187.
  110. 188.
  111. 189.
  112. 190.
  113. 191.
  114. 192.
  115. 193.
  116. 194.
  117. 195.
  118. 196.
  119. 202.
  120. 203.
  121. 204.
  122. 205.
  123. 206.
  124. 208.
  125. 209.
  126. 210.
  127. 211.
  128. 216.
  129. 217.