scale_range.m

来自「数据挖掘的工具箱,最新版的,希望对做这方面研究的人有用」· M 代码 · 共 40 行

M
40
字号
%SCALE_RANGE Give a vector of scales%%     SIG = SCALE_RANGE(X,NR)%% Give a reasonable range of scales SIG for the dataset X. The largest% scale is given first. If NR is given, the number of scales is NR.% This function is useful in consistent_occ.%% Default: NR = 20%% See also: consistent_occ, parzen_dd, svdd% Copyright: D. Tax, R.P.W. Duin, davidt@ph.tn.tudelft.nl% Faculty of Applied Physics, Delft University of Technology% P.O. Box 5046, 2600 GA Delft, The Netherlands  function sig = scale_range(x,nr)if nargin<2	nr = 20;endif isdataset(x)	x = +x;end% Compute the distancesd = sqrt(sqeucldistm(x,x));% Find the largest and the smallest distance:dmax = max(d(:));d(d<=1e-12) = dmax;dmin = min(d(:));% ... and compute the range:log10 = log(10);sig = logspace(log(dmax)/log10,log(dmin)/log10,nr);return

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?