已知一组数据x,大概服从拉普拉斯分布,如何才能估计出对应的参数呢?。
Show older comments
我想用f = fittype('a*exp(-(abs(x-b)/c))'); [cfun,gof] = fit(x,y,f);
但是我不知道y呀,我只有一堆数据(一幅图像的DCT系数),应该怎么做呢,拜托老师了,还有就是matlab中为什么没有Laplacefit函数呢,各位有能否分享一下呢
Answers (1)
拉普拉斯分布只有一个位置和一个尺度参数。位置参数就是中位数,尺度参数就是每个点到中位数的平均距离。
function [mu, b] = estimate_laplace_params(data)
% 估计位置参数 μ(中位数)
mu = median(data);
% 估计尺度参数 b
b = mean(abs(data - mu));
end
Categories
Find more on 邻域和数据块处理 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!