How do I code in matlab the nested loop algorithm for outlier detection
2 views (last 30 days)
Show older comments
Nested Loop Algorithm
1. The nested-loop algorithm for computing outliers simply computes, for each input point , p.
2. DK(p) is the distance of kth nearest neighbor of the input point p.
3. It then selects the top n points with maximum distance Dk values.
4. In order to compute Dk for points, the algorithm scans the database for each point p.
5. For a point p , a list of k nearest points for p _ is maintained.
6. For each point q from the database, a check is made to see if dist(p,q) is smaller than the kth nearest neighbor so far.
7. If the check succeeds, q is included in the list of the k nearest neighbors for p.
8. If the list contains more than k neighbors, then the point that is furthest away from p is deleted from the list.
9. Assuming a total buffer size of B% of the dataset size, the algorithm divides the entire buffer space into two halves
10. The nested loop algorithm can be made I/O efficient by computing Dk for a block of points together.
ody
0 Comments
Answers (2)
Image Analyst
on 29 Apr 2014
Why not just use the Mathworks-supplied outlier detection code: http://www.mathworks.com/matlabcentral/fileexchange/3961-deleteoutliers? Why reinvent the wheel?
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!