sensors approximate computing
play

Sensors Approximate computing approximate edge detection Machine - 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 Sensors Approximate computing


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

  2. Sensors �

  3. Approximate computing � approximate edge detection

  4. Machine learning � hidden units z M w (1) w (2) MD KM x D y K outputs inputs y 1 x 1 w (2) z 1 10 x 0 z 0

  5. 60 50 40 Speed (mph) 30 20 10 0 Time

  6. 60 50 40 Speed (mph) 30 24 mph 20 10 0 Time

  7. 60 50 40 Speed (mph) 30 24 mph 20 10 0 Time

  8. Edge detection �

  9. Edge detection �

  10. Edge detection �

  11. Edge detection � Sobel( p ) �

  12. Edge detection � Sobel( p ) � 0.4940 �

  13. Edge detection � Sobel( p ) � 0.4940 �

  14. Edge detection � Sobel( p ) � 0.4940 �

  15. Approximate edge detection � 0.4940 � 3.4% average error �

  16. Approximate edge detection � What is the gradient at pixel p ? � 3.4% average Sobel(p) � training error �

  17. Approximate edge detection � What is the gradient at pixel p ? � 3.4% average Sobel(p) � training error � Is there an edge at pixel p ? � if ¡(Sobel(p) ¡> ¡0.1) ¡ ¡ ¡ ¡ ¡EdgeFound(); �

  18. Approximate edge detection � What is the gradient at pixel p ? � 3.4% average Sobel(p) � training error � Is there an edge at pixel p ? � 36% false positives if ¡(Sobel(p) ¡> ¡0.1) ¡ on the same data! � ¡ ¡ ¡ ¡EdgeFound(); �

  19. Approximate edge detection � What is the gradient at pixel p ? � 3.4% average Sobel(p) � training error � Is there an edge at pixel p ? � 36% false positives if ¡(Sobel(p) ¡> ¡0.1) ¡ on the same data! � ¡ ¡ ¡ ¡EdgeFound(); � Computation compounds uncertainty! �

  20. ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡GeoCoordinate ¡ ¡Location; � ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡double ¡ ¡Grad ¡= ¡Sobel(p); �

  21. Uncertain<GeoCoordinate> ¡Location; � Uncertain<double> ¡Grad ¡= ¡Sobel(p); �

  22. � Uncertain<T> is an uncertain type abstraction. � It encourages non-expert developers to explicitly reason about uncertainty. �

  23. Uncertain<GeoCoordinate> ¡LastLoc ¡= ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡GPS.GetLocation(); ¡ Sleep(5); ¡ Uncertain<GeoCoordinate> ¡Loc ¡= ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡GPS.GetLocation(); ¡

  24. Uncertain<GeoCoordinate> ¡LastLoc ¡= ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡GPS.GetLocation(); ¡ Sleep(5); ¡ Uncertain<GeoCoordinate> ¡Loc ¡= ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡GPS.GetLocation(); ¡ Uncertain<double> ¡Dist ¡= ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡GPS.Distance(Loc, ¡LastLoc); ¡ Uncertain<double> ¡Speed ¡= ¡Dist ¡/ ¡5; ¡

  25. Uncertain<GeoCoordinate> ¡LastLoc ¡= ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡GPS.GetLocation(); ¡ Sleep(5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¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡GPS.GetLocation(); ¡ Uncertain<double> ¡Dist ¡= ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡GPS.Distance(Loc, ¡LastLoc); ¡ Uncertain<double> ¡Speed ¡= ¡Dist ¡/ ¡5; ¡ if ¡(Speed ¡> ¡4) ¡print("Great ¡job!"); ¡ print("Your ¡speed: ¡" ¡+ ¡Speed.E()); � Just $24.99 �

  28. Probabilistic programming � BUGS, Church, Infer.NET, …

  29. Probabilistic programming � BUGS, Church, Infer.NET, … hidden units z M w (1) w (2) MD KM x D y K inputs outputs y 1 x 1 w (2) z 1 10 x 0 z 0

  30. Probabilistic programming � BUGS, Church, Infer.NET, … hidden units z M w (1) w (2) MD KM x D y K inputs outputs y 1 x 1 w (2) z 1 10 x 0 z 0

  31. Probabilistic programming � BUGS, Church, Infer.NET, … hidden units z M w (1) w (2) MD KM x D y K inputs outputs y 1 x 1 w (2) z 1 10 x 0 z 0 Uncertain< T > helps developers without statistics PhDs.

  32. Uncertain<GeoCoordinate> ¡LastLoc ¡= ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡GPS.GetLocation(); � A variable of type Uncertain< T > is a random variable, represented by a distribution. �

  33. Uncertain<GeoCoordinate> ¡LastLoc ¡= ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡GPS.GetLocation(); � A variable of type Uncertain< T > is a random variable, represented by a distribution. � “We define accuracy as the radius of 68% confidence [of a] normal distribution.” —Android

  34. Sampling functions return random samples.

  35. Sampling functions return random samples. Simple computations. ✓ �

  36. Sampling functions return random samples. Simple computations. ✓ � Represent many distributions. ✓ �

  37. Sampling functions return random samples. Simple computations. ✓ � Represent many distributions. ✓ � Sampling is approximate. ✗ � (Later: how Uncertain< T > learned to love approximation, and you can too)

  38. Uncertain<double> ¡Speed ¡= ¡Dist ¡/ ¡5; ¡

  39. Uncertain<double> ¡Speed ¡= ¡Dist ¡/ ¡5; ¡ Or more generally, Z ¡= ¡X ¡+ ¡Y , if X and Y are distributions.

  40. Uncertain<double> ¡Speed ¡= ¡Dist ¡/ ¡5; ¡ Or more generally, Z ¡= ¡X ¡+ ¡Y , if X and Y are distributions. X Y

  41. Uncertain<double> ¡Speed ¡= ¡Dist ¡/ ¡5; ¡ Or more generally, Z ¡= ¡X ¡+ ¡Y , if X and Y are distributions. X Y Z=X+Y

  42. Uncertain<double> ¡Speed ¡= ¡Dist ¡/ ¡5; ¡ Or more generally, Z ¡= ¡X ¡+ ¡Y , if X and Y are distributions. X Y Z=X+Y If is a sample of X x and is a sample of Y y then is a sample of X+Y * x+y * if X and Y are independent

  43. D ¡= ¡A ¡/ ¡B � E ¡= ¡D ¡– ¡C ¡ Bayesian network representation: E - D / C A B

  44. D ¡= ¡A ¡/ ¡B � E ¡= ¡D ¡– ¡C ¡ Bayesian network representation: E - D / C A B Sampling function for E recursively samples children.

  45. If is a sample of X x and is a sample of Y y then is a sample of X+Y * x+y * Only if X and Y are independent.

  46. If is a sample of X x and is a sample of Y y then is a sample of X+Y * x+y * Only if X and Y are independent. A ¡= ¡X ¡+ ¡Y ¡ (X,Y independent) B ¡= ¡A ¡+ ¡X ¡

  47. If is a sample of X x and is a sample of Y y then is a sample of X+Y * x+y * Only if X and Y are independent. A ¡= ¡X ¡+ ¡Y ¡ (X,Y independent) B ¡= ¡A ¡+ ¡X ¡ A and B depend on X – not independent!

  48. If is a sample of X x and is a sample of Y y then is a sample of X+Y * x+y * Only if X and Y are independent. A ¡= ¡X ¡+ ¡Y ¡ (X,Y independent) B ¡= ¡A ¡+ ¡X ¡ A and B depend on X – not independent! B + A + X Y X

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