[ 
https://issues.apache.org/jira/browse/METRON-640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15815133#comment-15815133
 ] 

ASF GitHub Bot commented on METRON-640:
---------------------------------------

Github user cestella commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/403#discussion_r95375717
  
    --- Diff: 
metron-platform/metron-common/src/main/java/org/apache/metron/common/dsl/functions/StringFunctions.java
 ---
    @@ -284,4 +287,36 @@ private static Object fill(FillDirection direction, 
Object inputObject, Object f
         }
         return 
org.apache.commons.lang.StringUtils.rightPad(input,requiredLength,fill);
       }
    +
    +  @Stellar( namespace="STRING"
    +          , name="ENTROPY"
    +          , description = "Computes the base-2 shannon entropy of a string"
    --- End diff --
    
    Good catch; this is, at this point, pretty classical work, so I link to the 
wikipedia definition rather than claude shannon's original work.


> Add a Stellar function to compute shannon entropy for strings
> -------------------------------------------------------------
>
>                 Key: METRON-640
>                 URL: https://issues.apache.org/jira/browse/METRON-640
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Casey Stella
>
> A common feature used for models (especially DGA models) is shannon entropy 
> of strings.  We should have the ability to compute it in stellar.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to