Professional Documents
Culture Documents
Incremental LOF Algorithm
Incremental LOF Algorithm
Incremental LOF Algorithm
Factor Algorithm
Not outlier
Outlier
Outlier
Local Reachability Distance (lrd)
k=MinPts=4
LOF Factor
6.05
60
3.70
50
40
2.26
30
20
1.38
10
0.87
LOF factor
Identified Outliers
Reachability Distance
d O , p , O is not among k nearest neighbors of p
reach dist (O , p ) (1)
k dis tan ce p , O is among k nearest neighbors of p
K-neighborhood (k=3)
k-distance(p)
d O, p , O k-NN p
reach dist (O, p )
k dis tan ce p , O k-NN p
f
lrd (O )
1 Dataset New point
LOF computed for the new point
reach _ dist k (O , p ) / k
for all k neighbors p
Compute reach-dist from new point
f
1 to its k-neighbors
lrd ( p )
Update k-distance for points having
LOF (O ) k for all k neighbors p
lrd (O ) New point in its k-neighborhood
Beverly
Tom
Inverse k-Nearest Neighbor
Query
Sue is among 2 nearest neighbors of Tom!
Sue is among 2 nearest neighbors of Allen!
Allen and Tom are inverse 2-nearest neighbors of Sue
Sue Allen
Beverly
Tom
Incremental LOF_insertion(Dataset S)
· Given: Set S {p1, … ,pN} pi RD to be inserted into the database
· For each data point pc in data set S
insert(pc)
Compute kNN(pc)
(pj kNN(pc))
compute reach-distk(pc,pj) using Eq. (1);
//Update_neighbors of pc
Supdate_k_distance =inverse k-NN(pc);
(pj Supdate_k_distance)
update k-distance(pj);
Supdate_lrd = Supdate_k_distance;
(pj Supdate_k_distance), (pikNN(pj)\{pc})
reach-distk(pi,pj) =k-distance(pj);
if pj kNN(pi)
Supdate_lrd = Supdate_lrd {pi};
Supdate_LOF = Supdate_lrd;
(pm Supdate_lrd)
update lrd(pm) using Eq. (2);
Supdate_LOF = Supdate_LOF inverse k-NN(pm);
(pl Supdate_LOF)
update LOF(pl) Eq. (3);
IncrementalLOF_deletion(Dataset S,Sdelete)
¨ Given: Dataset S {p1, … ,pN} pi RD,
¨ Set Sdelete {p1, … ,pM} pi RD to be deleted
¨ Supdate_k_distance=;
¨ (pc Sdelete)
Supdate_k_distance = Supdate_k_distanceinverse k-NN (pc);
delete(pc); //we can delete pc after finding all friends
¨ Supdate_k_distance= Supdate_k_distance\Sdelete; //points from Sdelete may still be
//present when computing inverse nearest neighbors
¨ (pj Supdate_k_distance)
update k-distance(pj);
¨ Supdate_lrd = Supdate_k_distance;
¨ (pj Supdate_k_distance) (pi(k-1)NN (pj))
reach-distk(pi,pj)=k-distance(pj);
if pj kNN (pi) then Supdate_lrd = Supdate_lrd {pi};
¨ Supdate_LOF = Supdate_lrd;
¨ (pm Supdate_lrd)
update lrd(pm) using Eq. (2);
Supdate_LOF = Supdate_LOF inverse k-NN (pm);
¨ (pl Supdate_LOF)
Performance of Incremental LOF
algorithm
• The number of points where reach-dist, lrd, LOF is to
be updated is:
– Limited
– Does not depend on N
• E.g., For insertion:
– |Supdate_k_distance| F=O(k 2D)
– |Supdate_lrd| k|Supdate_k_distance| =O(k2 2D)
– |Supdate_LOF| (1+F)|Supdate_k_distance| =O(k3 22D)
60
50
# LOF updates
40
30
Dimension
20
2
3
10 4
5
10
0
0 1000 2000 3000 4000 5000
Number of points
600
500
400
300
200
100
0
0 1000 2000 3000 4000 5000
Number of points
400
300
200
100
0
2 4 6 8 10 12 14 16 18 20
k
400
300
200
100
0
0 234 5 10 15 20
k
Outliers in Trajectories
]Trajectory Representation
Application of Incremental LOF
• Detection of unusual events in video sequence
25
Dynamic LOF
Identified transitions
Static LOF
20
15
10
0
20 30 40 50 60 70 80 90 100
Work in Progress
• Incremental LOF algorithm with “fading
memory”
– Old examples have gradually less and less
influence on the outlier computation
• Incrementalization of other outlier detection
algorithms
• Indexing structures for efficient
implementation of kNN, inverse-kNN
• Computation of tighter bounds for F
Thanks a lot!
• David Mount, CS, Univ. of • Dejan Milic, University of Nis
Maryland, College Park • Nenad Milosevic, University of
• Janko Milutinovic, DSU Nis
• Kam Kong, DSU • Aleksandra Vidovic, University
• Dragana Jankovic, DSU of Nis
• Brian Tjaden, Wellesley • Zoran Peric, University of Nis
College, USA • Jelena Nikolic, University of
• DOD/DOA for supporting Nis
this research • Marko Petrovic, University of
Nis
• Aleksandra Jovanovic,
University of Nis