Calculates a entropy measure from a string of characters.
Function Traits: FieldComputationFunction
, Transformation
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
as | string | optional | _shannonentropy | The output name of the field to set. |
field [a] | string | required | The name of the input field. | |
The parameter name for field
can be omitted; the following forms are equivalent:
logscale
shannonEntropy("value")
and:
logscale
shannonEntropy(field="value")
shannonEntropy()
Examples
Shows how to calculate a shannon entropy value for the string in a
field. An input event with the field
dns_name with the value
example.com
results in the field
entropy having the rounded value 3.095795.
logscale
entropy := shannonEntropy(dns_name)