A Collection of Fitting Functions

版本 1.0.0.0 (23.6 KB) 作者: Ohad Gal
A collection of fitting functions for various distributions.
33.0K 次下载
更新时间 2004/4/29

查看许可证

%
% This folder contains a collection of "fitting" functions.
% (Some has demo options - the third section)
% The GENERAL input to the functions should be samples of the distribution.
%
% for example, if we are to fit a normal distribution ('gaussian') with a mean "u" and varaince "sig"^2
% then the samples will distribute like:
% samples = randn(1,10000)*sig + u
%
%fitting with Least-Squares is done on the histogram of the samples.
% fitting with Maximum likelihood is done directly on the samples.
%
%
% Contents of this folder
% =======================
% 1) Maximum likelihood estimators
% 2) Least squares estimators
% 3) EM algorithm for estimation of multivariant gaussian distribution (mixed gaussians)
% 4) added folders: Create - which create samples for the EM algorithm test
% Plot - used to plot each of the distributions (parametric plot)
%
%
%
%
%
% Maximum likelihood estimators
% =============================
% fit_ML_maxwell - fit maxwellian distribution
% fit_ML_rayleigh - fit rayleigh distribution
% (which is for example: sqrt(abs(randn)^2+abs(randn)^2))
% fit_ML_laplace - fit laplace distribution
% fit_ML_log_normal- fit log-normal distribution
% fit_ML_normal - fit normal (gaussian) distribution
%
% NOTE: all estimators are efficient estimators. for this reason, the distribution
% might be written in a different way, for example, the "Rayleigh" distribution
% is given with a parameter "s" and not "s^2".
%
%
% least squares estimators
% =========================
% fit_maxwell_pdf - fits a given curve of a maxwellian distribution
% fit_rayleigh_pdf - fits a given curve of a rayleigh distribution
%
% NOTE: these fit function are used on a histogram output which is like a sampled
% distribution function. the given curve MUST be normalized, since the estimator
% is trying to fit a normalized distribution function.
%
%
%
%
% Multivariant Gaussian distribution
% ==================================
% for demo of 1D mixed-gaussian fitting, run: fit_mix_gaussian
% for demo of 2D mixed-gaussian fitting, run: fit_mix_2d_gaussian
%
% these routines fit and plot the results of the parameters of:
% random distribution of random amount of gaussians with random parameters
%

引用格式

Ohad Gal (2024). A Collection of Fitting Functions (https://www.mathworks.com/matlabcentral/fileexchange/4222-a-collection-of-fitting-functions), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R12.1
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Interpolation 的更多信息
致谢

启发作品: The Watson Optical Trap Simulator

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0

fixed normalization ratio of "fit_ML_normal.m" (and "plot_normal.m"), and added an example to it's help

make sure you have the paths set correct.