HistogramLinearFunction¶
-
MLModule
¶
Purpose¶
The module HistogramLinearFunction
computes (an approximation to) a PDF (probability density function) and a CDF (cumulative distribution function) of a piecewise multi-linear function.
The module internally employs the same algorithm as the ThresholdLinearFunction
module to compute the CDF, see there for more details. The PDF the derivative of the CDF and is computed out of the CDF using central differences.
Parameter Fields¶
Field Index¶
Apply : Trigger |
Auto apply : Bool |
Interpolate PDF : Bool |
Level : Integer |
Number of Points : Integer |
Recommended Level : Integer |
Visible Fields¶
Number of Points¶
-
name:
numPoints
, type:
Integer
, default:
100
, minimum:
2
¶ Sets the number of points in which the CDF (and hence also the PDF) is actually computed.
The higher the number, the better are the approximations. But note that in order to get a correct result, it is also required to choose the
Level
parameter large enough.
Interpolate PDF¶
-
name:
interpolatepdf
, type:
Bool
, default:
TRUE
¶ If checked, the PDF is being replaced with a piecewise linear function.
Since the approximation to the PDF is computed out of a piecewise linear CDF, it is naturally piecewise constant. If this field is enabled, it is, however, replaced with a piecewise linear function (obtained by interpolation between the interval midpoints). Since the curves are approximations anyway, this is usually recommended to do since it makes the PDF smoother. However, be aware of the fact that enabling this field will cause the integral of the PDF approximation to differ from the correct value of 1.
Recommended Level¶
-
name:
recommLevel
, type:
Integer
, persistent:
no
¶ Sets a recommended level value.
The error that the algorithm makes (besides the fact that the function itself is usually only an approximation of the function you actually want to examine) consists of (a) errors due to leaving out some details of the function, (b) errors due to the approximation by a piecewise linear function, and (c) round-off errors. If you choose the level to be at least the value displayed here, the (a) part of the error is guaranteed to vanish. You should, however, not take this value too seriously.
Level¶
-
name:
level
, type:
Integer
, default:
1
, minimum:
1
¶ Sets a value to influence the precision of the computation.
The higher this value is chosen, the more precise the result is. The number of points at which the function is evaluated is given by (2l + 1)d, but the algorithm will evaluate some points more than once, and the number of function evaluations is therefore larger and given by (3 * 2l - 1)d. The level must be at least 1. (You will find the reason for this yourself if you compute the number of function evaluations for l=0.)