cs-541 wireless sensor networks - university of cretehy541/lectures_files/lectures...1)randomly...

55
CS-541 Wireless Sensor Networks Spring Semester 2017-2018 Prof Panagiotis Tsakalides, Dr Athanasia Panousopoulou, Dr Gregory Tsagkatakis Lecture 11: Machine Learning in WSN Spring Semester 2017-2018 CS-541 Wireless Sensor Networks University of Crete, Computer Science Department 1

Upload: others

Post on 21-Feb-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

CS-541Wireless Sensor Networks

Spring Semester 2017-2018

Prof Panagiotis Tsakalides, Dr Athanasia Panousopoulou, Dr Gregory Tsagkatakis

Lecture 11: Machine Learning in WSN

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department1

Page 2: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Machine Learning

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department2

Page 3: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Machine Learning

Machine learning: construction and study of algorithms thatcan learn from data

• Models of example inputs (training data) → makepredictions or decisions on new inputs (testing data)

•Data: characteristics

•Prior assumptions: a priori knowledge

•Representation: How do we represent the data

•Model / Hypothesis space: Hypotheses to explain the data

•Feedback / learning signal: Learning signal (delayed, labels)

•Learning algorithm: Model update

•Evaluation: Check qualitySpring Semester 2017-2018

CS-541 Wireless Sensor NetworksUniversity of Crete, Computer Science Department

3

Page 4: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Types of ML

Supervised learning: present example inputs and theirdesired outputs (labels) → learn a general rule that mapsinputs to outputs.

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department4

Page 5: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Types of ML

Unsupervised learning: no labels are given → find structure ininput.

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department5

Page 6: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Types of ML

Reinforcement learning: system interacts with environmentand must perform a certain goal without explicitly telling itwhether it has come close to its goal or not.

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department6

Page 7: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Applications in WSNs

Network performance optimization

• Routing

• Distributed regression framework

• Data Aggregation

• Localization and Objects Targeting

• Medium Access Control

Data Mining

• Activity recognition

• Event Detection and Query Processing

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department7

Page 8: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Unsupervised learning - Clustering

What is a cluster?

groups of data instances that are similar to each other in one cluster and data instances that are very different from each other into different clusters

Hard vs. Soft

• Hard: belong to single cluster

• Soft: belong to multiple clusters

Flat vs. Hierarchical

• Flat: clusters are flat

• Hierarchical: clusters form a tree

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department8

Page 9: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

K-means clustering

•K-means is a partitional clustering algorithm

• Let the set of data points (or instances) D be

{x1, x2, …, xn}, where xi = (xi1, xi2, …, xir) is a vector in a real-valued space X Rr, and r is the number of attributes (dimensions) in the data.

•The k-means algorithm partitions the given data into k clusters. • Each cluster has a cluster center, called centroid.• k is specified by the user

CS-541 Wireless Sensor Networks University of Crete, Computer Science Department

9Spring Semester 2017-2018

Page 10: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

K-means algorithm

Given k, the k-means algorithm works as follows:1)Randomly choose k data points (seeds) to be the initial

centroids, cluster centers2)Assign each data point to the closest centroid3)Re-compute the centroids using the current cluster

memberships.4)If a convergence criterion is not met, go to 2).

Stopping criteria

• no re-assignments of data points to different clusters

• no change of centroids

• minimum decrease in the

CS-541 Wireless Sensor Networks University of Crete, Computer Science Department

10

k

jC j

j

distSSE1

2),(x

mx

Spring Semester 2017-2018

Page 11: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

K-means example

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department11

Complexity is O( n * K * I * d )n = number of points, K = number of clusters, I = number of iterations, d = dimensionality

Page 12: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Issues with K-means

• Random initialization -> different clusters each time

• Data points are assigned to only one cluster

• Implicit assumptions about the “shapes” of clusters

• You have to pick the number of clusters…

Cluster tightness

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department12

iC

i

k

i i

dC

Qx

x ),(||

1

1

Q

k

Page 13: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Distance Between Two Clusters

single-link clustering: distance between clusters -> shortest distance between any two members.

complete-link clustering: distance between clusters -> longest distance between any two members.

average-link clustering: distance between clusters -> average distance between any two members

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department13

Page 14: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Hierarchical Agglomerative Clustering

• We start with every data point in a separate cluster

• We keep merging the most similar pairs of data points/clusters until we have one big cluster left

• This is called a bottom-up or agglomerative method

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department14

Page 15: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Hierarchical Clustering (cont.)

• This produces a binary tree or dendrogram

• The final cluster is the root and each data item is a leaf

• The height of the bars indicate how close the items are

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department15

Page 16: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

• Scalability: • Reduce routing tables to within cluster

• Data Aggregation• Energy reduction vs. full data transmission• CH based data fusion • multi-hop tree structure aggregation

• Load Balancing• Eliminate redundant data transmissions• Communications between CHs

• Energy reduction • Selective sampling within cluster• Short-range communications with CH

• Robustness & Fault tolerance• Support node failure/recovery• mobility of sensors • noisy measurements etc.

• Efficiency• Collision avoidance (intra vs. inter cluster communications)• Latency reduction by reducing hops• Network life-time maximization• Quality-of-service

Clustering in WSN

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department16

Page 17: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Supervised Learning

Learn f(x) from training examples

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department17

Output y∈YInput x∈X y = f(x)

Decision rule Generalization: Ockham’s razor

Page 18: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Applications

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department18

Class 1 Class 3 Class 6 Class ?

Page 19: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Support Vector Machines (SVMs)

SVMs are linear classifiers that find a hyperplane to separate two class of data, positive and negative

Training examples D be {(x1, y1), (x2, y2), …, (xr, yr)},

• input vector: xi = (x1, x2, …, xn) X Rn

• class label: yi {1, -1}. SVM finds a linear function of the form (w: weight vector)

f(x) = w x + b

V. Vapnik in 1970s in Russia (became known in 1992).

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department19

01

01

bif

bify

i

i

ixw

xw

Page 20: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Support Vector Machines

• SVMs maximize the margin around the separating hyperplane.

• The decision function is fully specified by a subset of training samples, the support vectors

• Max Margin classification

margin

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department20

wT x + b = 0

wTxa + b = 1

wTxb + b = -1

ρ

wTxi + b ≥ 1 if yi = 1

wTxi + b ≤ −1 if yi = −1

w

2=r

Page 21: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Support Vector Machines

Specification of loss function

• support vector machines

• logistic regression

• lasso regression

• ridge regression

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department21

Target y0/1 Loss: |X-X*|

Squared Loss (X-X*)2

Page 22: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

SVM optimization

Quadratic optimization problem:

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department22

Find w and b such that

is maximized; and for all {(xi , yi)}

wTxi + b ≥ 1 if yi=1; wTxi + b ≤ -1 if yi = -1

w

2=r

Find w and b such that

Φ(w) =½ wTw is minimized;

and for all {(xi ,yi)}: yi (wTxi + b) ≥ 1

Page 23: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

23

Soft Margin Classification

• If the training data is not linearly separable, slack variables ξi can be added to allow misclassification of difficult or noisy examples.

• Allow some errors• Let some points be moved to where

they belong, at a cost

• Still, try to minimize training set errors, and to place hyperplane “far” from each class (large margin)

ξj

ξi

Sec. 15.2.1

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department

Page 24: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

24

Soft Margin Classification Mathematically

• The old formulation:

• The new formulation incorporating slack variables:

• Parameter C can be viewed as a way to control overfitting• A regularization term

Find w and b such that

Φ(w) =½ wTw is minimized and for all {(xi ,yi)}yi (wTxi + b) ≥ 1

Find w and b such that

Φ(w) =½ wTw + CΣξi is minimized and for all {(xi ,yi)}yi (wTxi + b) ≥ 1- ξi and ξi ≥ 0 for all i

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department

Page 25: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Non-linear SVM

Linear separable case is the ideal situation.

What about Non Linear?

• map the data in the input space X to a feature space F via a nonlinear mapping φ → kernel trick

SVM: f(x) = Kw x + b

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department25

,

Page 26: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

The “Kernel Trick”

The inner product of two observations is given by

The linear support vector classifier can be written as

The solution function can take the form

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department26

dxxxxK )',1()',(

)/||'||exp()',( 2 cxxxxK

)',tanh()',( 21 kxxkxxK

dth degree polynomial

Radial kernel

Neural network

Page 27: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Supervised Event Detection

Objective

Event Detection -> the network has to identify which application-specific incident has occurred based on the raw data gathered byindividual sensor nodes.

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department27

Page 28: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Supervised Event Detection

Feature extraction

• Min, max, avg, wavelet…

• Discretization

Classification

• DT, SVM, kNN

Training vs. Testing

• Data

• Resources

• Overheads

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department28

Page 29: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Community Seismic Network

ObjectiveDetect seismic motion using accelerometers in smartphones and other consumer devicesAnd issue real-time alerts

• Limit false alarm

Hypothesis testing

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department29

Page 30: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Distributed Learning in WSN

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department30

Machine Learning

Model

Exam

ple

s

Features

Sensor (Worker)

Sensor (Worker)

Sensor (Worker)

Sensor (Worker)

FUSION

Page 31: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

3131

Gossip-based Distributed SVM (2/7)

Train locally SVM at each sensor

SVi(0) are exchanged to nodes Ni

Data at time step t, at node i: SVi(t) and SVN(i)(t)

Train SVM locally and construct wi(t+1))

000:0),0()0( i

l

ll

k

kklki wyxyxSV

MSG-SVM

> Energy Efficiency: transmit to neighbors only the support vectors that were

not transmitted in previous steps.

Problem Formulation

Graph of n nodes

Each edge is a communication link

Ni neighboring sensors of i

Gossip based SVM training

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department

Page 32: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

32

Gossip-based Distributed SVM (3/7)

)1(

kx

)1(

ly

)2(

kx

)2(

ly

S1

S2

Gossip-based Distributed SVM

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department

Page 33: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Perc

enta

ge o

f th

e m

iscl

assi

fied

dat

a

33

Gossip-based Distributed SVM (6/7)

Iterations

Gossip-based Distributed SVM

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department

Page 34: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Large Scale Distributed & Parallel Processing

Objectives

• Highly decentralized

• Asynchronous

• Robust (fault & dynamics)

Architectures

• Google MapReduce,

• Apache Spark

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department34

MapRecord

ValueKey

ValueKey

Reduce

Value

Key

Value

ValueKey

Page 35: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Distributed Supervised Learning

Collaborative training for Distributed Learning

• Require only local communications

Message-passing algorithms

• Bipartite graphs

• Iterative updates

Architecture

• m agents (sensors)

• S={(xi,yi)}i=1…n data sources

• For WSN: n = neighbors

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department35

Page 36: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Collaborative training for Distributed Learning

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department36

Page 37: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Decision Trees & Forests

Rule-based prediction

Trees hierarchically encode rule-based prediction• Nodes test features to branch

• Leaves produce predictions

Decision tree -> set of rules

• Each path from the root to a leaf

Splitting rule

• Information gain

• Sensitivity to attribute selection

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department37

overcast

high normal falsetrue

sunny rain

No NoYes Yes

Yes

Outlook

HumidityWindy

Page 38: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

....…

Decision Trees & Forests

Random Forests grows many classification trees.

Classify a new object from an input vector,

• run the input vector down each of the trees in the forest.

• Each tree gives a classification-> "vote" for that class.

• The forest chooses the classification having the most votes

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department38

N e

xam

ple

s

...…

Take the majority

vote

M features

Page 39: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Multi-label classification

• Is it eatable?

• Is it sweet?

• Is it a fruit?

• Is it a banana?

Is it a banana?

Is it an apple?

Is it an orange?

Is it a pineapple?

Is it a banana?

Is it yellow?

Is it sweet?

Is it round?

Dif

fere

nt

stru

ctu

res

Nested/ Hierarchical Exclusive/ Multi-class General/StructuredSpring Semester 2017-2018

CS-541 Wireless Sensor NetworksUniversity of Crete, Computer Science Department

39

Page 40: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Online Machine Learning

Sequential/Stream data processing

For t=1,2,… inf Receive input X Apply predictor y=Ht(x) Receive true label y* Suffer loss L(y-y*) Update predictor Ht+1 = F(Ht(x), L(y-y*))

Goal: perform almost as well as someone who observes theentire sequence and picks the best prediction strategy

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department40

Page 41: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Reinforcement Learning

Modeling as a Markov Decision Process (MDP)

• a set of environment states S

• a set of actions A

• rules of transitioning between states π(At,At+1)

• rules for the reward of a transition R(St,At)

• rules that describe what the agent observes

Goal:

Reinforcement learning methods specify how the agent changes its policy as a result of experience.

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department41

Page 42: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

• Search-based: evolution directly on a policy• E.g. genetic algorithms

• Model-based: build a model of the environment• Then you can use dynamic programming

• Memory-intensive learning method

• Model-free: learn a policy without any model• Temporal difference methods (TD)

• Requires limited episodic memory (though more helps)

• Q-learning• The TD version of Value Iteration

• This is the most widely used RL algorithm

Types of Reinforcement Learning

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department42

Page 43: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Q-Learning

Define Q*(s,a): “Total reward if an agent in state s takes action a, then acts optimally at all subsequent time steps”

Optimal policy: π*(s)=argmaxaQ*(s,a)

•Q(s,a) is an estimate of Q*(s,a)

•Q-learning motion policy: π(s)=argmaxaQ(s,a)

•Update Q recursively:

)','(max),('

asQrasQa

10

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department43

Page 44: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department44

Page 45: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Multi-Agent Learning

Centralized Learning (isolated learning)• Learning executed by a single agent (no interaction)

• Several learners -> different or identical goals at the same time

• Decentralized Learning (interactive learning)• Several agents are engaged in the same learning process

• Groups of agents -> different or identical goals at the same time

• Single agent may be involved in several learning processes at the same time

Question:

• Communications overhead

• Convergence speed

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department45

Page 46: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Multi-Agent Learning

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department46

Page 47: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department47

Page 48: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Wireless Sensor & Actuator Networks (WSAN)

WSANs: sense, interact, and change the physical world

• Sensors gather information about the state of physical world

• Sensors transmit the collected data to actuators (single/multi-hop)

• Actuators make the decision about how to react to this information

• Actuators perform actions to change the physical environment.

• The base station is monitoring and managing the overall network

CS-541 Wireless Sensor NetworksUniversity of Crete, Computer Science Department

48Spring Semester 2017-2018

Page 49: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

WSANs Characteristics

• Throughput: the effective number of data flow transported within a certain period of time

• Delay: queuing delay, switching delay, propagation delay, etc.

• Jitter: variations in delay. Difference in queuing delays experienced by consecutive packets.

• Packet loss rate: congestion, bit error, or bad connectivity.

• Resources: data processing capability, transmission rate, battery energy, and memory

• Platform Heterogeneity

• Dynamic Network Topology: stationary sensor & mobile actuators

• Mixed Traffic: periodic and aperiodic data

CS-541 Wireless Sensor NetworksUniversity of Crete, Computer Science Department

49Spring Semester 2017-2018

Page 50: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Models for WSANs

• no explicit controller

• data gathered by sensors will be transmitted directly to the corresponding actuators via single-hop or multi-hop communications

• one or more controller entities explicitly exist in the WSAN

• both the sensor data and control commands need to be transmitted wirelessly in a single-hop or multi-hop fashion

CS-541 Wireless Sensor NetworksUniversity of Crete, Computer Science Department

50Spring Semester 2017-2018

Page 51: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

WSAN applications

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department51

Page 52: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Coordination among sensors

• sensor nodes in the event area communicate witheach other to find the nearest actuator node(s) thatcovers the area & sufficient energy for the task.

(+) actuator nodes are excluded from this coordinationeffort.

(-) sensor nodes around the event area will depletetheir energy quicker.

• each sensor node independently selects an actuatornode

(+) No sensor-to-sensor coordination,

(-) may overload a given actuator or cause sensornodes around an actuator node to deplete their energyquicker.

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department52

Page 53: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Coordination among actuators

• Centralized decision category

(+) the decision center is able to select the bestactuator nodes to carry out a task

(-) increased end-to-end delays

• Distributed decision category

(+) reduced actuator response time

(-) increased energy consumption (communications)

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department53

Page 54: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department54

Page 55: CS-541 Wireless Sensor Networks - University of Cretehy541/Lectures_files/Lectures...1)Randomly choose k data points (seeds) to be the initial centroids, cluster centers 2)Assign each

Reading List

Abu Alsheikh, Mohammad, et al. "Machine learning in wireless sensornetworks: Algorithms, strategies, and applications." CommunicationsSurveys & Tutorials, IEEE 16.4 (2014): 1996-2018.

Flouri, K., B. Beferull-Lozano, and P. Tsakalides. "Optimal gossipalgorithm for distributed consensus SVM training in wireless sensornetworks." Digital Signal Processing, 2009 16th InternationalConference on. IEEE, 2009.

Predd, Joel B., Sanjeev R. Kulkarni, and H. Vincent Poor. "Acollaborative training algorithm for distributed learning." InformationTheory, IEEE Transactions on 55.4 (2009): 1856-1871.

Spring Semester 2017-2018CS-541 Wireless Sensor Networks

University of Crete, Computer Science Department55