资源简介
matlab下的幂律拟合函数
先构造函数 然后验证是否拟合效果好
代码片段和文件信息
function [pgof]=plpva(x xmin varargin)
% PLPVA calculates the p-value for the given power-law fit to some
% data.计算了P值 实现数据和幂率分布的拟合
% Source: http://www.santafe.edu/~aaronc/powerlaws/
%
% PLPVA(x xmin) takes data x and given lower cutoff for the power-law
% behavior xmin and computes the corresponding p-value for the
% Kolmogorov-Smirnov test according to the method described in
% Clauset Shalizi Newman (2007).函数xmin指的是截断位置
% PLPVA automatically detects whether x is composed of real or integer
% values and applies the appropriate method. For discrete data if
% min(x) > 1000 PLPVA uses the continuous approximation which is
% a reliable in this regime.
%
% The fitting procedure works as follows:
% 1) For each possible choice of x_min we estimate alpha via the
% method of maximum likelihood and calculate the Kolmogorov-Smirnov
% goodness-of-fit statistic D.
% 2) We then select as our estimate of x_min the value that gives the
% minimum value D over all values of x_min.
%
% Note that this procedure gives no estimate of the uncertainty of the
% fitted parameters nor of the validity of the fit.
%
% Example:
% x = (1-rand(100001)).^(-1/(2.5-1));
% [p gof] = plpva(x 1);
%
% For more information try ‘type plpva‘
%
% See also PLFIT PLVAR
% Version 1.0 (2007 May)
% Version 1.0.2 (2007 September)
% Version 1.0.3 (2007 September)
% Version 1.0.4 (2008 January)
% Version 1.0.5 (2008 March)
% Version 1.0.6 (2008 April)
% Version 1.0.7 (2009 October)
% Copyright (C) 2008-2009 Aaron Clauset (Santa Fe Institute)
% Distributed under GPL 2.0
% http://www.gnu.org/copyleft/gpl.html
% PLPVA comes with ABSOLUTELY NO WARRANTY
%
% Notes:
%
% 1. In order to implement the integer-based methods in Matlab the numeric
% maximization of the log-likelihood function was used. This requires
% that we specify the range of scaling parameters considered. We set
% this range to be [1.50 : 0.01 : 3.50] by default. This vector can be
% set by the user like so
%
% p = plpva(x 1‘range‘[1.001:0.001:5.001]);
%
% 2. PLPVA can be told to limit the range of values considered as estimates
% for xmin in two ways. First it can be instructed to sample these
% possible values like so
%
% a = plpva(x1‘sample‘100);
%
% which uses 100 uniformly distributed values on the sorted list of
% unique values in the data set. Second it can simply omit all
% candidates above a hard limit like so
%
% a = plpva(x1‘limit‘3.4);
%
% Finally it can be forced to use a fixed value like so
%
% a = plpva(x1‘xmin‘1);
%
% In the case of discrete data it rounds the limit to the nearest
% integer.
%
% 3. The default number of semiparametric repetitions of the fitting
% procedure is 1000. This number can be changed like so
%
% p = plvar(x 1‘reps‘10000);
%
% 4. To silence the textual outpu
- 上一篇:多种图像处理的方法 matlab
- 下一篇:matlab 目标检测算法
相关资源
- matlab 目标检测算法
- 多种图像处理的方法 matlab
- matlab与云模型组合仿真
- 均值滤波Matlab程序
- matlab 2015a许可文件
- 几种Matlab的边缘分割处理代码
- 蚁群算法的特征选取 matlab实现
- 插值抽取实现分数阶延时的matlab程序
- matlab多机器人避障
- matlab蓄电池模型
- 感应电机矢量控制matlab仿真
- 相关干涉仪算法
-
matlabSimuli
nk仿真模型.doc - TF98的matlab程序代码
- matlab sar 图像检测的程序
- 标记分水岭分割算法的matlab实现
- 压缩感知图像MATLAB代码美国乔治亚理
- 跳跃式滑翔弹道仿真程序
- 高等光学仿真》matlab源程序
- 流形学习算法matlab
- 频域块LMS算法
- matlab7.1win764位破解版.rar
- 图像融合MATLAB程序
- 最大流MATLAB
- hdb3编译码 matlab
- arma模型_matlab源码
- MATLAB计算对极线程序
- matlab求取二维数组极大值与极小值
- MATLAB非线性优化fmincon详解
- 4CPM_matlab
评论
共有 条评论