⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nndist_range.m

📁 data description toolbox 1.6 单类分类器工具包
💻 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 + -