programming the internet of uncertain t hings
play

Programming the Internet of Uncertain <T>hings James Bornholt - PowerPoint PPT Presentation

Programming the Internet of Uncertain <T>hings James Bornholt University of Washington Na Meng University of Texas at Austin Todd Mytkowicz Microsoft Research Kathryn S. McKinley Microsoft Research 1 2 24 mph 2 3 GeoCoordinate


  1. Programming the Internet of Uncertain <T>hings James Bornholt University of Washington Na Meng University of Texas at Austin Todd Mytkowicz Microsoft Research Kathryn S. McKinley Microsoft Research 1

  2. 2

  3. 24 mph 2

  4. 3

  5. GeoCoordinate PrevLocn = Get(); Sleep(5); GeoCoordinate Location = Get(); 4

  6. GeoCoordinate PrevLocn = Get(); Sleep(5); GeoCoordinate Location = Get(); double Dist = Distance(LastLocn, Location); double Speed = Dist / 5; 5

  7. GeoCoordinate PrevLocn = Get(); Sleep(5); GeoCoordinate Location = Get(); double Dist = Distance(LastLocn, Location); double Speed = Dist / 5; if (Speed > 4) Alert("Keep it up!"); 6

  8. 7

  9. 59 mph 7

  10. 8

  11. sensors machine learning 8

  12. sensors machine learning 9

  13. sensors machine learning approximate computing 9

  14. Uncertain< T > an abstraction for reasoning about noise [ASPLOS’14] exploiting context language constructs to make data more accurate 10

  15. Uncertain< T > an abstraction for reasoning about noise [ASPLOS’14] exploiting context language constructs to make data more accurate 10

  16. GeoCoordinate PrevLocn = Get(); Sleep(5); GeoCoordinate Location = Get(); double Dist = Distance(LastLocn, Location); double Speed = Dist / 5; if (Speed > 4) Alert("Keep it up!"); 11

  17. Uncertain<GeoCoordinate> PrevLocn = Get(); Sleep(5); Uncertain<GeoCoordinate> Location = Get(); Uncertain<double> Dist = Distance(LastLocn, Location); Uncertain<double> Speed = Dist / 5; if (Speed > 4) Alert("Keep it up!"); 12

  18. Uncertain<GeoCoordinate> PrevLocn = Get(); Sleep(5); Uncertain<GeoCoordinate> Location = Get(); Uncertain<double> Dist = Distance(LastLocn, Location); Uncertain<double> Speed = Dist / 5; if (Speed > 4) 8 6 % f e w e Alert("Keep it up!"); r e r r o r s 12

  19. Semantics Uncertain<T> encapsulates probability distributions and hides statistical complexity. • Computing over random variables • Deciding conditionals 13

  20. Computations Represent distributions by random samples X Y X+Y 14

  21. Computations Represent distributions by random samples X Y X+Y x x y y 14

  22. Computations Represent distributions by random samples X Y X+Y x y x + y x y 14

  23. Computations Operators build a Bayesian network rather than evaluating immediately. D = A / B A B 15

  24. Computations Operators build a Bayesian network rather than evaluating immediately. D = A / B / D A B 15

  25. Computations Operators build a Bayesian network rather than evaluating immediately. D = A / B E = D - C / D C A B 15

  26. Computations Operators build a Bayesian network rather than evaluating immediately. – E D = A / B E = D - C / D C A B 15

  27. Deciding conditionals if (Speed > 4) Alert("Keep it up!"); 4 mph 0 2 4 6 8 10 Speed (mph) 16

  28. Deciding conditionals if (Speed > 4) Alert("Keep it up!"); 4 mph 0 2 4 6 8 10 Speed (mph) 17

  29. Deciding conditionals if (Speed > 4) Alert("Keep it up!"); 4 mph Pr[Speed > 4] 0 2 4 6 8 10 Speed (mph) 17

  30. Deciding conditionals More likely than not if (Speed > 4) that Speed > 4? Alert("Keep it up!"); 4 mph Pr[Speed > 4] 0 2 4 6 8 10 Speed (mph) 17

  31. Deciding conditionals if ((Speed > 4).Pr(0.9)) Alert("Keep it up!"); 4 mph Pr[Speed > 4] 0 2 4 6 8 10 Speed (mph) 18

  32. Deciding conditionals At least 90% likely if ((Speed > 4).Pr(0.9)) that Speed > 4? Alert("Keep it up!"); 4 mph Pr[Speed > 4] 0 2 4 6 8 10 Speed (mph) 18

  33. Identifying absurd data GeoCoordinate PrevLocn = Get(); Sleep(5); GeoCoordinate Location = Get(); double Dist = Distance(LastLocn, Location); double Speed = Dist / 5; if (Speed > 4) // 7 mph Alert("That’s crazy!"); 19

  34. Identifying absurd data GeoCoordinate PrevLocn = Get(); Sleep(5); GeoCoordinate Location = Get(); double Dist = Distance(LastLocn, Location); double Speed = Dist / 5; Naive: 30 times if (Speed > 4) // 7 mph Alert("That’s crazy!"); 19

  35. Identifying absurd data Uncertain<GeoCoordinate> PrevLocn = Get(); Sleep(5); Uncertain<GeoCoordinate> Location = Get(); Uncertain<double> Dist = Distance(LastLocn, Location); Uncertain<double> Speed = Dist / 5; Naive: 30 times if (Speed > 4) // 7 mph Alert("That’s crazy!"); 20

  36. Identifying absurd data Uncertain<GeoCoordinate> PrevLocn = Get(); Sleep(5); Uncertain<GeoCoordinate> Location = Get(); Uncertain<double> Dist = Distance(LastLocn, Location); Uncertain<double> Speed = Dist / 5; Naive: 30 times if (Speed > 4) // 7 mph 50%: 4 times Alert("That’s crazy!"); 20

  37. Identifying absurd data Uncertain<GeoCoordinate> PrevLocn = Get(); Sleep(5); Uncertain<GeoCoordinate> Location = Get(); Uncertain<double> Dist = Distance(LastLocn, Location); Uncertain<double> Speed = Dist / 5; Naive: 30 times if ((Speed > 4).Pr(0.9)) 50%: 4 times Alert("That’s crazy!"); 21

  38. Identifying absurd data Uncertain<GeoCoordinate> PrevLocn = Get(); Sleep(5); Uncertain<GeoCoordinate> Location = Get(); Uncertain<double> Dist = Distance(LastLocn, Location); Uncertain<double> Speed = Dist / 5; Naive: 30 times if ((Speed > 4).Pr(0.9)) 50%: 4 times Alert("That’s crazy!"); 90%: never 21

  39. Uncertain< T > an abstraction for reasoning about noise [ASPLOS’14] exploiting context language constructs to make data more accurate 22

  40. Uncertain< an abstraction for reasoning about noise exploiting context language constructs to make data more accurate 22

  41. 23

  42. 23

  43. if (RecognizeBeard(photo)) AddBeardToAvatar(); 23

  44. if (RecognizeBeard(photo)) AddBeardToAvatar(); 23

  45. City userCity = ...; if (RecognizeBeard(photo)) AddBeardToAvatar(); 23

  46. context City userCity = ...; application-specific if (RecognizeBeard(photo)) domain knowledge AddBeardToAvatar(); 23

  47. Static context City Beard • How does city influence beards? Bernoulli HasBeard_City(City c) { if (c == "Seattle") return new Bernoulli(0.4); else return new Bernoulli(0.2); } var Cities = Uniform(...); Bernoulli HasBeard = HasBeard_City <| Cities; 24

  48. Static context City Beard • How does city influence beards? Bernoulli HasBeard_City(City c) { if (c == "Seattle") return new Bernoulli(0.4); else return new Bernoulli(0.2); } var Cities = Uniform(...); Bernoulli HasBeard = HasBeard_City <| Cities; 24

  49. Static context City Beard • How does city influence beards? Bernoulli HasBeard_City(City c) { if (c == "Seattle") return new Bernoulli(0.4); else return new Bernoulli(0.2); } var Cities = Uniform(...); Bernoulli HasBeard = HasBeard_City <| Cities; 24

  50. Static context City Beard • How does city influence beards? Bernoulli HasBeard_City(City c) { if (c == "Seattle") return new Bernoulli(0.4); else return new Bernoulli(0.2); } var Cities = Uniform(...); Bernoulli HasBeard = HasBeard_City <| Cities; 24

  51. Static context City Beard • How does city influence beards? Bernoulli HasBeard_City(City c) { if (c == "Seattle") return new Bernoulli(0.4); else return new Bernoulli(0.2); } var Cities = Uniform(...); Bernoulli HasBeard = HasBeard_City <| Cities; 24

  52. Static context City Beard • How does city influence beards? Bernoulli HasBeard_City(City c) { if (c == "Seattle") return new Bernoulli(0.4); else return new Bernoulli(0.2); } var Cities = Uniform(...); Bernoulli HasBeard = HasBeard_City <| Cities; 24

  53. Static context City Beard • How does city influence beards? Bernoulli HasBeard_City(City c) { if (c == "Seattle") return new Bernoulli(0.4); else return new Bernoulli(0.2); } var Cities = Uniform(...); Bernoulli HasBeard = HasBeard_City <| Cities; 24

  54. Dynamic context City Beard • Exploit knowledge about this user var Cities = Uniform(...); Bernoulli HasBeard = HasBeard_City <| Cities; 25

  55. Dynamic context City Beard • Exploit knowledge about this user var Cities = Uniform(...); Bernoulli HasBeard = HasBeard_City <| Cities; Cities.Value = "Seattle"; 25

  56. Dynamic context City Beard • Exploit knowledge about this user var Cities = Uniform(...); Bernoulli HasBeard = HasBeard_City <| Cities; Cities.Value = "Seattle"; Bernoulli oldHasBeard = BeardRecognizer(photo); 25

  57. Dynamic context City Beard • Exploit knowledge about this user var Cities = Uniform(...); Bernoulli HasBeard = HasBeard_City <| Cities; Cities.Value = "Seattle"; Bernoulli oldHasBeard = BeardRecognizer(photo); Bernoulli newHasBeard = oldHasBeard # HasBeard; 25

Recommend


More recommend