📄 nndist_range.m
字号:
%NNDIST_RANGE Give a vector of scales%% D = NNDIST_RANGE(X)% D = NNDIST_RANGE(X,NR)%% Give the average nearest neighbor distance in dataset X. When NR is% specified, the first NR nearest distances are returned.%% Default: NR = 1%% See also: svdd% Copyright: D.M.J. Tax, D.M.J.Tax@prtools.org% Faculty EWI, Delft University of Technology% P.O. Box 5031, 2600 GA Delft, The Netherlands function d = nndist_range(x,nr)if nargin<2 nr = 1;endif isdataset(x) x = +x;endif nr>(size(x,1)+1) error('Insufficient number of objects in dataset X.');end% Compute the distancesD = sqrt(sqeucldistm(x,x));% Sort the distances:sD = sort(D,2);% and find the averaged distances:d = mean(sD(:,2:(nr+1)),1);return
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -