Table of Contents | ||||
---|---|---|---|---|
|
Description
Adds a new column that returns the Shannon entropy of a given string.
How does it work in the search window?
Select Create column field in the search window toolbar, then select the Shannon entropy operation. You need to specify one argument:
Argument | Data type |
---|---|
String mandatory | string |
The data type of the values in the new column field is float.
Example
In the demosiem.logtrust.ecommerceweb.dataactivity
table, we want to create a new column field that calculates the Shannon entropy of the strings in our uri columnuserid field. To do itthis, we will create a new column field using the Shannon entropy operation.
The arguments needed to create the new column are:
String - uri column userid field
...
Click Create columnfield and you will see the following result:
...
Use the operator select
... as
... and add the operation syntax to create the new column. This is the syntax for the Shannon entropy operation:
shannonentropy(string)
Example
You can copy the following LINQ script and try the above example on the demosiem.logtrust.ecommerceweb.dataactivity
table.
Code Block |
---|
from demosiem.logtrust.ecommerceweb.dataactivity select shannonentropy(uriuserid) as urishannonentropy_shannonentropyuserid |