Professional Documents
Culture Documents
CS541 Lecture11
CS541 Lecture11
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
Cluster tightness
k
1
Q
Q
d (x , i )
i 1 | Ci | x Ci
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 y 1 if w xi b 0
1 if w x i b 0
i
wTxb + b = -1
wT x + b = 0
Objective
Event Detection -> the network has to identify which application-
specific incident has occurred based on the raw data gathered by
individual sensor nodes.
Feature extraction
• Min, max, avg, wavelet…
• Discretization
Classification
• DT, SVM, kNN
Training vs. Testing
• Data
• Resources
• Overheads
Objective
Detect seismic motion using accelerometers
in smartphones and other consumer devices
And issue real-time alerts
• Limit false alarm
Hypothesis testing
Machine
Model
Learning
Features
Sensor
(Worker)
Sensor
(Worker)
FUSION
Sensor
(Worker)
Sensor
(Worker)
CS-541 Wireless Sensor Networks
Spring Semester 2017-2018 30
University of Crete, Computer Science Department
Gossip-based Distributed
Gossip based SVM training SVM (2/7)
Problem Formulation
Graph of n nodes
Each edge is a communication link
Ni neighboring sensors of i
MSG-SVM
Train locally SVM at each sensor SVi (0) xk (0), yl 0 : k xk 0 l yl 0 wi 0
SVi(0) are exchanged to nodes Ni k l
Data at time step t, at node i: SVi(t) and SVN(i)(t)
Train SVM locally and construct wi(t+1))
> Energy Efficiency: transmit to neighbors only the support vectors that were
not transmitted in previous steps.
3131
CS-541 Wireless Sensor Networks
Spring Semester 2017-2018
University of Crete, Computer Science Department
Gossip-based
Gossip-basedDistributed
DistributedSVM
SVM(3/7)
xk(1)
yl(1) S1
xk( 2 )
S2
yl( 2 )
Iterations
Objectives
• Highly decentralized
• Asynchronous
• Robust (fault & dynamics)
Architectures
• Google MapReduce,
• Apache Spark
Key Value Value
Record Map Key Reduce Key Value
Key Value Value
CS-541 Wireless Sensor Networks
Spring Semester 2017-2018 34
University of Crete, Computer Science Department
Distributed Supervised Learning
Rule-based prediction
Trees hierarchically encode rule-based prediction
• Nodes test features to branch
Outlook
• Leaves produce predictions
Decision tree -> set of rules sunny
overcast rain
• Each path from the root to a leaf
Splitting rule Humidity Yes
Windy
• Information gain
• Sensitivity to attribute selection high normal true false
No Yes No Yes
features
Take the
....… majority
...…
vote
• Q-learning
• The TD version of Value Iteration
• This is the most widely used RL algorithm