How do I code in matlab the nested loop algorithm for outlier detection

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

カテゴリ

ヘルプ センター および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

質問済み:

2014 年 4 月 29 日

回答済み:

2014 年 4 月 29 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by