近邻搜索算法

最近邻搜索(Nearest Neighbor Search)

Name of the problem: nearest neighbors, k nearest neighbors (kNN, k-NN), nearset neighbor search, proximity search, similarity search, approximate nearest neighbors (ANN), range queries, maximal intersection queries, post-office problem, partial match, best match file searching, best match retrieval, sequence nearest neighbors (SNN). 

Solution concepts: locality-sensitive hashing (LSH), low-distortion embeddings, k-d trees, kd-trees, metric trees, M-trees, R*-trees, vp-trees, vantage point trees, vantage point forest, multi-vantage point tree, bisector trees, Orchard's algorithm, random projections, fixed queries tree, Voronoi tree, BBD-tree, min-wise independent permutations, Burkhard-Keller tree, generalized hyperplane tree, geometric near-neighbor access tree (GNAT), approximating eliminating search algorithm (AESA), inverted index, spatial approximation tree (SAT). 

Applications: k-nearest neighbor classification algorithm, image similarity identification, audio similarity identification, fingerprint search, audio/video compression (MPEG), optical character recognition, coding theory, function approximation, recommendation systems, near-duplicate detection, targeting on-line ads, distributional similarity computation, spelling correction, nearest neighbor interpolation. 

常见的近邻搜索库包括ANN,FLNN,当然八叉树也可以实现近邻搜索。也可以通过狄洛尼三角网实现近邻的判断。

1.K近邻搜索、近似近邻搜索

 

2.k-d树

 

3.R树

 

 对应点的matlab显示

复制代码
fileID = fopen('data2\\correspondence_1.txt');
C =textscan(fileID,'%f%f%f%f%f%f%d%d%f') ;
modelx=C{1};
modely=C{2};
modelz=C{3};
datax=C{4};
datay=C{5};
dataz=C{6};
distance=C{9};
%误差向量
vectorx=modelx-datax;
vectory=modely-datay;
vectorz=modelz-dataz;
figure(1);
hold on
    plot3(modelx,modely,modelz, 'r+');
    plot3(datax,datay,dataz, 'b+');

    %% 连线
    for i = 1:size(modelx,1)
        plot3([modelx(i) datax(i)], [modely(i) datay(i)], [modelz(i) dataz(i)], 'g--')
    end
    axis equal
hold off
figure(2);
hold on
    hist(distance,100);
hold off
复制代码

参考文献:

1. http://www.cnblogs.com/breakinen/archive/2012/03/31/bigdata_nearest_neighbor_search.html?utm_source=tuicool&utm_medium=referral

2. http://www.cnblogs.com/v-July-v/archive/2012/11/20/3125419.html

3. http://blog.sina.com.cn/s/blog_72e1c7550101dsc3.html

https://en.wikipedia.org/wiki/Nearest_neighbor_search#Approximate_nearest_neighbor

posted @   太一吾鱼水  阅读(3704)  评论(0编辑  收藏  举报
编辑推荐:
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2014-03-07 度分秒的正则表达式
2013-03-07 [GL]OpenGL 3D变换
2012-03-07 具有强审批工作流程系统建设方法学习
点击右上角即可分享
微信分享提示