uncertain t
play

Uncertain< T > A First-Order Type for Uncertain Data James - PowerPoint PPT Presentation

Uncertain< T > A First-Order Type for Uncertain Data James Bornholt Australian National University Todd Mytkowicz Microsoft Research Kathryn S. McKinley Microsoft Research Uncertain< T >: A First-Order Type for Uncertain Data 1 Location


  1. Uncertain< T > A First-Order Type for Uncertain Data James Bornholt Australian National University Todd Mytkowicz Microsoft Research Kathryn S. McKinley Microsoft Research Uncertain< T >: A First-Order Type for Uncertain Data 1

  2. Location ¡Loc ¡ ¡ ¡ ¡ ¡= ¡GetGPSLocation(); ¡ estimated discrete data type Uncertain< T >: A First-Order Type for Uncertain Data 2

  3. Uncertainty bug Location ¡Loc ¡ ¡ ¡ ¡ ¡ ¡= ¡GetGPSLocation(); ¡ applications use estimated data, but languages use discrete types estimated discrete data type Uncertain< T >: A First-Order Type for Uncertain Data 3

  4. public ¡class ¡GeoCoordinate ¡{ ¡ Using ¡ ¡ ¡ ¡public ¡double ¡Latitude; ¡ estimates as ¡ ¡ ¡ ¡public ¡double ¡Longitude; ¡ ¡ facts ¡ ¡ ¡ ¡public ¡double ¡HorizontalAccuracy; ¡ } ¡ Uncertain< T >: A First-Order Type for Uncertain Data 4

  5. public ¡class ¡GeoCoordinate ¡{ ¡ Using ¡ ¡ ¡ ¡public ¡double ¡Latitude; ¡ estimates as ¡ ¡ ¡ ¡public ¡double ¡Longitude; ¡ ¡ facts ¡ ¡ ¡ ¡public ¡double ¡HorizontalAccuracy; ¡ } ¡ Uncertain< T >: A First-Order Type for Uncertain Data 5

  6. public ¡class ¡GeoCoordinate ¡{ ¡ Using ¡ ¡ ¡ ¡public ¡double ¡Latitude; ¡ estimates as ¡ ¡ ¡ ¡public ¡double ¡Longitude; ¡ ¡ facts ¡ ¡ ¡ ¡public ¡double ¡HorizontalAccuracy; ¡ } ¡ OS #1 OS #2 95% confidence interval 68% confidence interval σ = 33 m σ = 39 m Uncertain< T >: A First-Order Type for Uncertain Data 6

  7. A Using B A+B estimates as facts 60 Computation 50 compounds Speed (mph) 40 error 30 Usain Bolt 20 10 Normal walking 0 Time Uncertain< T >: A First-Order Type for Uncertain Data 7

  8. Using estimates as facts if ¡(Distance ¡< ¡200) ¡... ¡ Computation compounds 200 m error Inference 0 100 200 300 asks wrong Distance (m) questions Uncertain< T >: A First-Order Type for Uncertain Data 8

  9. How do application writers handle estimated data without a PhD in statistics? Uncertain< T >: A First-Order Type for Uncertain Data 9

  10. How do application writers handle estimated data without a PhD in statistics? Uncertain< T > is an uncertain type abstraction. Uncertain< T >: A First-Order Type for Uncertain Data 10

  11. Related work Developer computations Probabilistic data Sensors, measurements, probabilistic models Uncertain< T >: A First-Order Type for Uncertain Data 11

  12. Related work Developer computations No abstraction Domain PhD Probabilistic data Sensors, measurements, probabilistic models Uncertain< T >: A First-Order Type for Uncertain Data 12

  13. Related work Developer computations No abstraction Probabilistic programming Domain PhD Statistics PhD Probabilistic data Sensors, measurements, probabilistic models Uncertain< T >: A First-Order Type for Uncertain Data 13

  14. Related work Developer computations No abstraction Probabilistic Current programming abstractions Domain PhD Statistics PhD App developers Probabilistic data Sensors, measurements, probabilistic models Uncertain< T >: A First-Order Type for Uncertain Data 14

  15. Related work Developer computations No abstraction Probabilistic Uncertain<T> Current programming abstractions Domain PhD Statistics PhD App developers App developers Probabilistic data Sensors, measurements, probabilistic models Uncertain< T >: A First-Order Type for Uncertain Data 15

  16. Related work Flexible Simple Developer computations No abstraction Probabilistic Uncertain<T> Current programming abstractions Domain PhD Statistics PhD App developers App developers Probabilistic data Sensors, measurements, probabilistic models Uncertain< T >: A First-Order Type for Uncertain Data 16

  17. 1 Identifying Measurement distributions model Source Distribution type T Uncertain< T > 2 Computing Experts provide measurement models with estimates (they probably already have them!) 3 Asking the right questions 4 Uncertain< T > approximates distributions Improving by random sampling estimates Uncertain< T >: A First-Order Type for Uncertain Data 17

  18. 1 A Identifying distributions B A+B 2 Computing Uncertain< T > lifts arithmetic operators with estimates (like +) to work over distributions 3 Asking the 10 0 10 − 1 Relative error (%) 10 − 1 Time (secs) right questions 10 − 2 10 − 2 10 − 3 10 − 3 10 − 4 10 − 4 4 10 1 10 2 10 3 10 4 10 5 10 6 10 7 10 1 10 2 10 3 10 4 10 5 10 6 10 7 N N Improving Sampling trades speed for accuracy estimates Uncertain< T >: A First-Order Type for Uncertain Data 18

  19. 1 Identifying “Is distance less than 200m?” distributions Pr[Distance < 200] 200 m 2 Computing with estimates 0 100 200 300 3 Distance (m) Asking the The answer is a probability. right questions Uncertain< T > accounts for sampling 4 error using hypothesis testing on Improving expected values. estimates Uncertain< T >: A First-Order Type for Uncertain Data 19

  20. 1 Identifying Pr[ H | E ] = Pr[ E | H ] Pr[ H ] distributions Pr[ E ] Bayes’ Theorem uses distributions to 2 form better estimates Computing with estimates 40 Raw speed 3 Improved speed Asking the 30 Speed (mph) right questions 20 4 10 Improving estimates 0 Time Uncertain< T >: A First-Order Type for Uncertain Data 20

  21. Uncertainty bugs: applications use estimated data, but languages use discrete types. Uncertain< T > is an uncertain type abstraction. Uncertain< T > makes programs more expressive and more correct. Uncertain< T >: A First-Order Type for Uncertain Data 21

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend