Class HyperexpFitLongtail
WHY MOMENTS ARE THE WRONG HANDLE. A Pareto law with tail index below 2 has infinite variance, so no two- or three-moment fit exists at all; and even when the moments are finite, matching them says nothing about the several ORDERS OF MAGNITUDE of time scale over which a long-tail law acts. This procedure matches the CCDF ITSELF at points spread across those decades.
THE RECURSION, with lambda_1 < ... < lambda_k. In the far tail only the slowest component survives, so it is fitted there alone from the ccdf at c_1 and b*c_1 (eqs. 4.4-4.5); subtract it and repeat one decade lower (eqs. 4.6-4.11). The last component takes the remaining probability and its rate follows from the ccdf at c_k (eqs. 4.12-4.14). This is Prony's method applied to a ccdf.
DEFAULTS. (b, decade) = (1.5, 4) rather than the paper's illustrative (2, 10): the fit is exact AT the fitting arguments and free between them, and measured on a Weibull(0.3) the tighter grid cuts the worst between-point error from about 54% to 12%, at the cost of more components.
Port of MATLAB hyperexp_fit_longtail.m.
Reference: A. Feldmann, W. Whitt (1998). Fitting mixtures of exponentials to long-tail distributions to analyze network performance models. Performance Evaluation 31, 245-279, Section 4.
- Since:
- LINE 3.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe within-scale spacing b of the fitting pairs.static final doubleThe ratio between successive fitting arguments. -
Method Summary
Modifier and TypeMethodDescriptionThe fit with the component count chosen automatically: one per decade between the 0.9 quantile and the 1e-6 quantile, retrying with fewer when the recursion runs out of probability near the body.hyperexp_fit_longtail(DoubleUnaryOperator ccdf, double b, double decade) hyperexp_fit_longtail_k(DoubleUnaryOperator ccdf, int k, double c1, double b, double decade) The recursion at a fixed component count.
-
Field Details
-
DEFAULT_B
public static final double DEFAULT_BThe within-scale spacing b of the fitting pairs.- See Also:
-
DEFAULT_DECADE
public static final double DEFAULT_DECADEThe ratio between successive fitting arguments.- See Also:
-
-
Method Details
-
hyperexp_fit_longtail
The fit with the component count chosen automatically: one per decade between the 0.9 quantile and the 1e-6 quantile, retrying with fewer when the recursion runs out of probability near the body.- Parameters:
ccdf- F^c(t) = P(X > t)- Returns:
- map with p, lambda, points (double[]), mean, targetMean, coverageLow, coverageHigh, maxRelError and maxRelErrorGrid
-
hyperexp_fit_longtail
public static Map<String,Object> hyperexp_fit_longtail(DoubleUnaryOperator ccdf, double b, double decade) - Parameters:
ccdf- F^c(t) = P(X > t)b- the within-scale spacingdecade- the ratio between successive fitting arguments- Returns:
- the fit, keyed as in the MATLAB struct
-
hyperexp_fit_longtail_k
public static Map<String,Object> hyperexp_fit_longtail_k(DoubleUnaryOperator ccdf, int k, double c1, double b, double decade) The recursion at a fixed component count.- Parameters:
ccdf- F^c(t) = P(X > t)k- number of exponential componentsc1- the largest fitting argumentb- the within-scale spacingdecade- the ratio between successive fitting arguments- Returns:
- the fit, keyed as in the MATLAB struct
-