%Thisfoldercontainsacollectionof"fitting"functions.%(Somehasdemooptions-thethirdsection)%TheGENERALinputtothefunctionsshouldbesamplesofthedistribution.%%forexample,ifwearetofitanormaldistribution('gaussian')withamean"u"andvaraince"sig"^2%thenthesampleswilldistributelike:%samples=randn(1,10000)*sig+u%%fittingwithLeast-Squaresisdoneonthehistogramofthesamples.%fittingwithMaximumlikelihoodisdonedirectlyonthesamples.%%%Contentsofthisfolder%=======================%1)Maximumlikelihoodestimators%2)Leastsquaresestimators%3)EMalgorithmforestimationofmultivariantgaussiandistribution(mixedgaussians)%4)addedfolders:Create-whichcreatesamplesfortheEMalgorithmtest%Plot-usedtoploteachofthedistributions(parametricplot)%%%%%%Maximumlikelihoodestimators%=============================%fit_ML_maxwell-fitmaxwelliandistribution%fit_ML_rayleigh-fitrayleighdistribution%(whichisforexample:sqrt(abs(randn)^2+abs(randn)^2))%fit_ML_laplace-fitlaplacedistribution%fit_ML_log_normal-fitlog-normaldistribution%fit_ML_normal-fitnormal(gaussian)distribution%%NOTE:allestimatorsareefficientestimators.forthisreason,thedistribution%mightbewritteninadifferentway,forexample,the"Rayleigh"distribution%isgivenwithaparameter"s"andnot"s^2".%%%leastsquaresestimators%=========================%fit_maxwell_pdf-fitsagivencurveofamaxwelliandistribution%fit_rayleigh_pdf-fitsagivencurveofarayleighdistribution%%NOTE:thesefitfunctionareusedonahistogramoutputwhichislikeasampled%distributionfunction.thegivencurveMUSTbenormalized,sincetheestimator%istryingtofitanormalizeddistributionfunction.%%%%%MultivariantGaussiandistribution%==================================%fordemoof1
1