转:http://blog.csdn.net/yihaizhiyan/article/details/19410793

利用vlfeat工具包可行。

网址见:http://www.vlfeat.org/matlab/vl_alldist2.html

返回: pairwise distance matrix D of the columns of S1 and S2, yielding

D = VL_ALLDIST2(X,Y) returns the pairwise distance matrix D of the columns of S1 and S2, yielding

D(i,j) = sum (X(:,i) - Y(:,j)).^2
VL_ALLDIST2(X) returns the pairwise distance matrix fo the columns of S, yielding

D(i,j) = sum (X(:,i) - X(:,j)).^2
VL_ALLDIST2(…,’METRIC’) changes the computed distance. Supported values for METRIC are

METRIC D(i,j)


LINF max |X - Y|
L2 sum (X - Y).^2
L1 sum |X - Y|
L0 sum (X ~= Y)
CHI2 sum (X - Y).^2 ./ (X + Y)
HELL sum (X^.5 - Y^.5) .^ 2
(Notice that the standard definition of chi2 is half of what is computed here).

VL_ALLDIST2(…,’KERNEL’) computes the following ‘kernels’ K:

KERNEL K(i,j)


KL2 sum X .* Y
KL1 sum min (X, Y)
KCHI2 2 * sum (X .* Y) ./ (X + Y)
KHELL (X .* Y) .^ 0.5
The constant are chosen so that D(i,j) = K(i,i) + K(j,j) - 2 K(i,j) where D is the metric corresponding to the kenrel (if the arguments are non-negative vectors). Each kernel can be interpreted as the inner product inducing the corresponding metric in an embedding of the real space into an approrpiate reproducing Kenrel Hilbert space.

VL_ALLDIST2() supports several storage classes. X and Y must have the same storage class. The sotrage class of D is promoted to reduce the chance of overvlow, but this is not checked.

转自:http://www.vlfeat.org/matlab/vl_alldist2.html
http://www.vlfeat.org/matlab/matlab.html

matlab 计算大型距离方阵,distance matrix相关推荐

  1. matlab 韩明距离_使用Matlab计算各种距离Distance

    计算距离的需求有两种: 一种是给定一个特征集合X,然后计算Pairwise距离矩阵,那么可使用D=pdist(X,distance)的方式: 另一种是给定两个对应的特征集合X和Y,然后计算X与Y对应的 ...

  2. matlab计算欧式距离代码,欧式距离计算公式

    spark开启推测机制后数据源是kafka,出现重复消费因为 推测机制会在其他机器去启动同一个task,难免会有数据重复消费 自己维护offset提交. 如何用Excel计算欧式距离 计算上边所有的欧 ...

  3. matlab计算欧式距离代码,在Matlab中有效地计算欧氏距离的成对平方

    这里通常给出的答案是基于bsxfun (参见例如[1] ). 我提出的方法是基于matrix乘法,结果比我能find的任何可比较的algorithm快得多: helpA = zeros(numA,3* ...

  4. 19.使用Matlab计算各种距离

    原文来源: MATLAB 距离计算_黑白_新浪博客 http://blog.sina.com.cn/s/blog_57235cc70100jjf8.html 判别分析时,通常涉及到计算两个样本之间的距 ...

  5. matlab 计算大圆距离,已知两点经纬度计算两点之间的大圆距离

    Const r As Double = 6378137 '地球半径常量 Const PI As Double = 3.1415926 '圆周率常量 Private Type LatLog lat As ...

  6. 文本匹配相似度计算---多种距离算法 ,多种相似度计算算法,一看就懂

    常见的距离算法和相似度(相关系数)计算方法 1.常见的距离算法 1.1欧几里得距离(Euclidean Distance) 欧氏距离是最易于理解的一种距离计算方法,源自欧氏空间中两点间的距离公式. ( ...

  7. matlab 韩明距离_汉明距离(差异位点有用的到)

    在做分类时常常需要估算不同样本之间的相似性度量(Similarity Measurement),这时通常采用的方法就是计算样本间的"距离"(Distance).采用什么样的方法计算 ...

  8. R语言计算曼哈顿距离(Manhattan Distance)实战:计算两个向量的曼哈顿距离、dist函数计算矩阵中两两元素的曼哈顿距离

    R语言计算曼哈顿距离(Manhattan Distance)实战:计算两个向量的曼哈顿距离.dist函数计算矩阵中两两元素的曼哈顿距离 目录 R语言计算曼哈顿距离(Manhattan Distance ...

  9. R语言distVincentyEllipsoid函数计算大圆距离实战(Great Circle Distance)

    R语言distVincentyEllipsoid函数计算大圆距离实战(Great Circle Distance) 目录 R语言distVincentyEllipsoid函数计算大圆距离实战(Grea ...

最新文章

  1. 一个半径为r的球体均匀带电_静电现象——一个易被忽略的细节
  2. iOS - 修改 UITextField 的 clearButtton 样式
  3. halcon旋转后坐标_FPGA大赛【八】具体模块设计图像旋转方案
  4. Redis你不得不探索的11个问题
  5. hp打印机一直显示正在打印中_惠普打印机哪个型号好 安装hp打印机驱动方法【详解】...
  6. centos7 docker安装_Centos7 安装 Docker
  7. 从零开始学前端:复习课程 --- 今天你学习了吗?(CSS:Day11)
  8. python类的定义与使用_Python15类的定义和使用
  9. 嫡权法赋权法_赋权法_
  10. Promethues (普罗米修斯)详细介绍
  11. 有关网络安全基础知识
  12. 计算机用通讯电压多少,电脑ATX电源改13.8V通信用电源!
  13. 赠与大学毕业生_如何出售或赠与您的Kindle
  14. Nginx 配置实现请求转发功能
  15. 前端React教程第六课 虚拟DOM
  16. 计算机键盘感叹号在哪里,键盘上感叹号是哪个键
  17. 第七十章 SQL函数 $JUSTIFY
  18. 解决echarts设置x轴、y轴刻度起始值、终止值以及步长
  19. 环境工程专业辅助计算机软件,环境工程
  20. Java数据结构-认识链表

热门文章

  1. Linux下的文件系统
  2. python arm64_PyTorch-aarch64
  3. 计算机电源原如何确定正常,打开计算机电源后,显示屏不会点亮. 显示器没有坏....
  4. php转盘抽奖源码yii2,yii2实现 上一篇,下一篇 功能的代码实例
  5. apache rewrite规则实现白名单
  6. Vue学习之路1 小白起步
  7. 转[再谈应用环境下的TIME_WAIT和CLOSE_WAIT]
  8. (第六场)Singing Contest 【模拟】
  9. 复利计算5.0——结对(总结)
  10. Ant 脚本打印系统属性变量、ant内置属性