You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Machine learning function
Difference pattern statistical functions
Copy page
Download PDF
Difference pattern statistical functions
This topic describes the syntax of difference pattern statistical functions supported by TLS and provides usage examples for common scenarios.​
Notice​
Currently, machine learning functions are in public beta.​
Function list​
​
Function​
Description​
Based on given field samples and judging criteria, analyze the set of differential patterns that affect the specified criteria.​
​
pattern_diff​
Function syntax​
  • Syntax format​
  • ​
    pattern_diff(array_char_value, array_char_name, array_numeric_value, array_numeric_name, condition, supportScore,posSampleRatio,negSampleRatio ) ​
    ​
  • Parameters description​
  • ​
    Parameters​
    Data type​
    Description​
    array_char_value​
    Array​
    Input column for character data.​
    Notice​
    The array_char_value and array_numeric_value can not both be empty.​
    array_char_name​
    Array​
    Name of the input column for character data.​
    array_numeric_value​
    Array​
    Input column for numeric data.​
    array_numeric_name​
    Array​
    Name of input column for numeric data.​
    condition​
    String​
    Criteria for filtering data. If the condition is True, it is a positive sample; if it is False, it is a negative sample.​
    supportScore​
    Double​
    Support degree of positive and negative samples during pattern mining. Valid values: (0,1].​
    posSampleRatio​
    Double​
    Sampling rate of positive samples. The default value is 0.5, which means only 50% of the positive sample set is selected. Valid values: (0,1].​
    negSampleRatio​
    Double​
    Sampling rate of negative samples. The default value is 0.5, which means only 50% of the negative sample set is selected. Valid values: (0,1].​
    ​
  • Return values​
  • If the input value is NULL, the function returns NULL.​
Function examples​
Query and analysis statements​
​
* | select pattern_diff(array[client_ip], array['client_ip'], array[stamp,value], array['stamp','value' ], ReqSize > 2000, 0.1,0.1,0.1) from (select client_ip, stamp,value,ReqSize,RespSize limit 10000)​
​
​
Last updated: 2026.05.08 14:32:56