ggmle.m
来自「基于小波变换的特征检索算法」· M 代码 · 共 26 行
M
26 行
function [ahat, bhat] = ggmle(x, options)
% GGMLE Parameter estimates for generalized Gaussian distributed data.
% GGMLE(X, OPTIONS) Returns the maximum likelihood estimates of the
% parameters of the generalized Gaussian distribution given the data in
% the vector, X.
%
% OPTIONS (option) is set by OPTIMSET to be used with FZERO
if min(size(x)) > 1
error('The first argument in GGMLE must be a vector.');
end
if nargin < 2
options = [];
end
% Method of Moments Estimates (for beta only)
absx = abs(x);
m1 = mean(absx);
m2 = mean(x.^2);
bhat = estbeta(m1, m2);
% Method of Maximum Likelihood Estimates
% (using Moment Estimate as the initial guess)
bhat = fzeron('dggbeta', bhat, options, absx);
ahat = (bhat * sum(absx .^ bhat) / length(x)) ^ (1 / bhat);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?