# Purpose¶

The module `ThresholdLinearFunction` computes the measure of the subset of points (in the bounding box) on which the value of a piecewise multi-linear function is above a given threshold.

More precisely, it computes the measure of the set on which the function is greater than or equal to the threshold.

Multiple thresholds can be specified, resulting in multiple results.

The module internally approximates the function by a piecewise linear (rather than multi-linear) function, where the pieces are d-simplices (d being the dimension). The bounding box is covered by 2d*l`*d! simplices (l being the level supplied in the :field:`level field), on each of which the corresponding measure is computed exactly. This usually gives a much better result than just evaluating the function on a uniform grid and counting the values that lie above the threshold.

# Input Fields¶

## inputFunction¶

`name: ``inputFunction``, type: ``MLBase`

# Parameter Fields¶

## Field Index¶

 `Apply`: `Trigger` `Auto apply`: `Bool` `Divide by box size`: `Bool` `Level`: `Integer` `Recommended Level`: `Integer` `Results`: `String` `Thresholds`: `String`

## Visible Fields¶

### Level¶

`name: ``level``, type: ``Integer``, default: ``1``, minimum: ``1`

Sets the level value.

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.)

### Divide by box size¶

`name: ``divideByBoxSize``, type: ``Bool``, default: ``TRUE`

If checked, the resulting measures are divided by the size of the bounding box, thus scaled to the interval [0,1].

### Thresholds¶

`name: ``thresh``, type: ``String`

Sets the thresholds (separated by commas) that you want to examine.

### Results¶

`name: ``result``, type: ``String`

Shows the resulting measures.

### Auto apply¶

`name: ``autoApply``, type: ``Bool``, default: ``FALSE`

If checked, the module computes anew on any parameter change.

### Apply¶

`name: ``apply``, type: ``Trigger`

If pressed, the module computes anew.