matlab 计算大型距离方阵,distance matrix
2015-10-21 11:18
330 查看
转: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
利用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中的分类器
- matlab实现将彩色图像(R,G,B)色分量的直方图显示出
- MATLAB中图像处理的函数
- matlab实现将彩色图像(R,G,B)色分量的直方图匹配,并计算其相关性
- 向量和矩阵的范数及MATLAB调用函数
- win8.1+MATLAB安装步骤
- Matlab求范数
- name_save matlab
- MATLAB数字图像处理(三)空间滤波
- MATLAB GPU并行编程
- Matlab与C++的混合编程
- 相机标定之OpenCV&Matlab
- matlab 将dcm文件转换为raw
- matlab 读取txt数据文件
- matlab高斯模板生成,K是归一化系数,上面是一个半径200的高斯模板用来做MSR
- MATLAB学习之内存溢出的管理方法
- matlab中编译cuda文件
- matlab 使用OPENCV
- 【转】使用文本文件(.txt)进行数据存取的技巧总结(相当的经典)
- Matlab中fminunc函数的意义 以及options函数的初级用法。