Calculate parameters for Laplace distributed values.
procedure LaplaceFit(const X: TVec; out mu: double; out b: double); overload;
Parameters |
Description |
X |
Stores data which is assumed to be Laplace distributed. |
mu |
Return Laplace distribution parameter estimator M. |
b |
Return Laplace distribution parameter estimator b. |
The following example generates 100 random Laplace distributed values and then uses LaplaceFit routine to extract used Mu and b parameters:
Uses StatRandom, Statistics, MtxExpr; procecure Example; var Data :Vector; mu,b: double; begin Data.Size(100); RandomLaplace(3,0.2,Data); LaplaceFit(Data,mu,b); // mu approx 3.0 // b approx 0.2 end;
#include "StatRandom.hpp" #include "MtxExpr.hpp" #include "Statistics.hpp" void __fastcall Example(); { sVector Data; Data.Size(100,false); RandomLaplace(3,0.2,Data); double mu, b; LaplaceFit(Data,mu,b); // mu approx 3.0 // b approx 0.2 }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
|
What do you think about this topic? Send feedback!
|