近邻搜索算法
最近邻搜索(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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于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 具有强审批工作流程系统建设方法学习