1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

20
1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington

Transcript of 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

Page 1: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

1

Chapter 8Prediction Algorithms for

Smart Environments

MavHome - U Tx Arlington

Page 2: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

2

Smart EnvironmentsDesign & Implementation requires breadth• Integration of disciplines• Machine learning• Human machine interfaces• Decision making• Wireless network• Mobile communication• Databases• Sensor nets• Pervasive computing

Page 3: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

3

Benefits of Automation

• Convenience– Turn off coffee, warm up car

• Conservation– Manage heat & cooling, lawn watering

• Do actual work -- Order groceries, vacuum carpet

See "Bob's Day" -- pg. 175-176

Page 4: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

4

Role of Prediction

Goals of Smart Environment:

• Maximize comfort

• Minimize costs

• Adapt to inhabitants

To Attain:

• Use tools from artificial intelligence– Prediction, automatic decision making

Page 5: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

5

Prediction• Learn about devices by observation

– At certain temperature, how long to warm house

• Utilization of resources, also– To cool house, turn on ceiling fan and/or close

blinds

• Predict inhabitant's behavior– Hardware: video, power meters, motion

detectors, load sensors, device controllers, vital sign monitors

– Software: prediction algorithms

Page 6: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

6

Prediction Outcomes

• Determine relevant features

• Make maximum use of information

• Minimal prediction errors

• Minimal delays (quick predictions)

• Prediction Decision Making Algorithm

Page 7: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

7

Prediction Algorithms* NOTE: Smart environment development is

not all hardware *

Prediction Task: process of forming an hypothesis representing the future value of a target variable for a given data point.

Prediction Algorithm: learns a function that maps known information collected from past/current observations to future point in time.

Page 8: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

8

Prediction Algorithms• Based on sequential ordering of events;

input to algorithm (plus maybe timing)

• Historical information + current state => prediction

• Given event sequence {x1, x2, x3 …. Xj}, what is event xj+1?

• Approaches– Pattern matching (sequence)– Markov Decision Process– Plan recognition

Page 9: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

9

Sequence Matching - IPAM• Just one example algorithm

• Collects sequential pairs; calculates probability of transitioning from one event to next

• e.g. {a, b, c, b, c, b, a, a}– (a,b) (b,c) (c,b) (b,c) (c,b), (b,a) (a,a)– p (a,b) = 1/7– p (b,c) = 2/7– p (a,c) = 0, etc.

• But, probabilities change over time and are kept in a table

Page 10: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

10

IPAM (continued)• When new event xj+1 is observed

– p (xj, xj+1) increases by factor of (1-α) • For some constant α

– All other p (xj, z) reduced by factor α

– Weights recent events more heavily

• Rank events by probability and prediction p (xj+1| xj)

• Sequence matching algorithms: applied to UNIX command prediction

Page 11: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

11

Markov Decision Process (MDP)• At each step, agent perceives environment

state, selects action

• Probability model + possible reward– Only last few stated used

• Unlike pattern matching

• Hidden Markov Models (HMM)– Observable vs. hidden states– Figure 8.3, pg. 179

– Hidden: current task (in chair sleeping or reading) & health (feel good or tired)

– Also probabilistic

Page 12: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

12

Plan Recognition Prediction

• Given a known goal, recognize possible plans to achieve– e.g. goal: cool house

• Plan 1: turn on air conditioner• Plan 2: turn on air conditioner and ceiling fans

• Based on Belief Network– DAG: nodes are RV, edge indicates influence– Figure 8.4, pg. 180

– Includes evidence to support plan generation

Page 13: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

13

Other Prediction Approaches

• Decision Trees

• Neural Nets

• Bayesian Classifiers

• Nearest Neighbor Algorithm

• Support Vector Machines

Page 14: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

14

MavHome - Smart Home - UTA

• Designed as an intelligent agent

• Goal: comfort of inhabitant & minimize cost of running home– Predict, reason, adapt

• Figure 8.5, pg. 181 -- intelligent agent

• Figure 8.6, pg. 182 -- architecture

• 4 layers– Decision, information, communication,

physical

Page 15: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

15

MavHome - 4 Layers• Decision: selects actions for agent to

execute

• Information: collect information, generate inferences for decision making

• Communication: routes information and requests between agents

• Physical: contains hardware -- appliances, network, sensors, etc.

• Bottom-up Process, pg. 182

Page 16: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

16

Identifying Events• Need to identify repetitive tasks for

potential automation

• Need to predict next action

• MavHome: prediction solely on previous interaction with devices plus current state– Prediction to decision –

• algorithm that selects action to execute

Page 17: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

17

AlgorithmsRepetition modeled as stationary,

stochastic process

3 Algorithms:

• ED (Episode Discovery): identify sequences of regular & repeatable actions that could be used to predict - thru Data Mining

• Active LeZi: uses sequence matching to predict next action

• MDL (Minimum Description Length) Principle: pointer to database description of patterns (compression)

Page 18: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

18

Experiment with Algorithms

• 30 days of data with noise– ED discovered 6 significant episodes (pg. 184)

• Use of the knowledge?– Provides understanding of nature of home– Patterns will be used in decision making– Can improve prediction accuracy

Page 19: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

19

Active LeZi• Based on Ziv - Lempel compression

(LZ78)– Good compression good prediction– LZ78 enhanced to improve prediction

• Calculates probability of each action occurring in a sequence & predicts one with highest

• Accuracy ≈ 48%– With random choice 2%

• MavHome - Figures pg. 189+

Page 20: 1 Chapter 8 Prediction Algorithms for Smart Environments MavHome - U Tx Arlington.

20

Conclusion• Comfort: minimize number of manual

interactions with environment

• Overview of Prediction