Metalog builder

<< Click to Display Table of Contents >>

Navigation:  Using GeNIe > Equation-based and hybrid models > Writing equations in GeNIe >

Metalog builder

Metalog builder dialog parallels the Learning Metalog distribution dialog, in which it was possible to fit a metalog distribution to a collection of data points. Metalog builder also allows for selecting a metalog distribution but the starting point is a collection of probability quantiles. The initial dialog looks as follows:

metalog_builder0

It is a good idea to start with lower and upper bounds, which are any real values with the only constraint that the lower bound is lower than than upper bound. It is possible to indicate infinite bounds by entering -inf and inf respectively or leaving the bound field empty.

Input parameters are probabilities and quantiles captured in the Input parameters table. Editing the table comes with a similar set of tools as editing probability tables (Add, Insert, and Delete buttons). Probabilities do not need to be sorted a-priori, as GeNIe will validate and sort them for you. GeNIe is also tolerant to empty rows. Quantiles in the table are constrained to be growing with higher probability values. Both columns can be copied and pasted.

Let us leave the bounds at infinity and enter the following quantiles:

metalog_builder_percentiles

Pressing Recalc button shows a set of plots of the metalog distributions for k=2 through n that fit the data, where n is the number of input parameters (quantiles of the distribution). Only the feasible metalog distributions are shown, so the number of distributions may be smaller than n-1. As the number of quantiles specified in the example is 5 and all metalog distributions are feasible, the dialog displays distributions for k=2, 3, 4, and 5.

Generally, the higher the number of quantiles specified, the more complex and flexible the distribution. However, high number of quantiles carries the danger of overfitting the data, so we advise prudent caution, looking at the distributions generated for different values of k, and selecting a not-too-high value of k that produces the desired distribution.

metalog_builder

Clicking on any of the four plots displays the CDF and PDF of the distribution on the right-hand side. The CDF plot shows the input quantiles. Obviously, the closer the points are to the CDF line, the better the fit.

metalog_builder1

Any plot in the Metalog builder can be copied and later pasted as a picture into any other Windows application by right-clicking on the plot and choosing Copy.

The buttons Get Metalog and Get MetalogA copy the formal description of the chosen metalog function for pasting elsewhere (usually in the definition of some node in your model).

metalog_definition        metalogA_definition

As explained in the section on Random number generators, the difference between the Metalog and MetalogA functions is that the latter uses internal metalog coefficients that do not have easily interpretable meaning. Metalog, on the other hand, uses parameters that are percentiles of the distribution. One might expect that MetalogA is more efficient in sample generation, as it skips the whole process of deriving the distribution from which it subsequently generates a sample. However, GeNIe has an efficient caching scheme that makes Metalog equally efficient in practice.

Please note that we made the functionality of Metalog Builder available to the community through a web interface at https://metalog.bayesfusion.com/.

For more information about the metalog distribution, please look at the comprehensive article on the topic on Wikipedia (https://en.wikipedia.org/wiki/Metalog_distribution), the Metalog Distribution web site created by Tom Keelin (http://metalogdistributions.com/) or the Metalog Distributions YouTube channel, educational videos (https://www.youtube.com/channel/UCyHZ5neKhV1mSsedzDBoqyA). These sources provide access to articles by Tom Keelin and colleagues on the topic of the metalog distribution.