已知一组数据x,大概服从拉普拉斯分布,如何才能估计出对应的参数呢?。
이전 댓글 표시
我想用f = fittype('a*exp(-(abs(x-b)/c))'); [cfun,gof] = fit(x,y,f);
但是我不知道y呀,我只有一堆数据(一幅图像的DCT系数),应该怎么做呢,拜托老师了,还有就是matlab中为什么没有Laplacefit函数呢,各位有能否分享一下呢
답변 (1개)
拉普拉斯分布只有一个位置和一个尺度参数。位置参数就是中位数,尺度参数就是每个点到中位数的平均距离。
function [mu, b] = estimate_laplace_params(data)
% 估计位置参数 μ(中位数)
mu = median(data);
% 估计尺度参数 b
b = mean(abs(data - mu));
end
카테고리
도움말 센터 및 File Exchange에서 邻域和数据块处理에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!