diff options
author | Luca Deri <deri@ntop.org> | 2022-04-04 10:02:45 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2022-04-04 10:02:45 +0200 |
commit | a6e2f4a15a52087ff3f2fa16bb990c998c5215a6 (patch) | |
tree | f8b5470e3cd1f620b5861455285fae5d2a1c4dfe /src/include/ndpi_api.h.in | |
parent | 19019383f0ca4262c43af30b8de9a96413f9534e (diff) |
Added ndpi_find_outliers() API call using Z-Score
Diffstat (limited to 'src/include/ndpi_api.h.in')
-rw-r--r-- | src/include/ndpi_api.h.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/ndpi_api.h.in b/src/include/ndpi_api.h.in index abd67655f..38cd7edc1 100644 --- a/src/include/ndpi_api.h.in +++ b/src/include/ndpi_api.h.in @@ -1558,6 +1558,7 @@ extern "C" { float ndpi_data_entropy(struct ndpi_analyze_struct *s); float ndpi_data_variance(struct ndpi_analyze_struct *s); float ndpi_data_stddev(struct ndpi_analyze_struct *s); + float ndpi_data_mean(struct ndpi_analyze_struct *s); u_int32_t ndpi_data_last(struct ndpi_analyze_struct *s); u_int32_t ndpi_data_min(struct ndpi_analyze_struct *s); u_int32_t ndpi_data_max(struct ndpi_analyze_struct *s); @@ -1653,6 +1654,20 @@ extern "C" { /* ******************************* */ + /* + * Finds outliers using Z-score + * Z-Score = (Value - Mean) / StdDev + * + * @par values = pointer to the individual values to be analyzed [in] + * @par outliers = pointer to a list of outliers identified [out] + * @par num_values = lenght of values and outliers that MUST have the same lenght [in] + * + * @return The number of outliers found + */ + u_int ndpi_find_outliers(u_int32_t *values, bool *outliers, u_int32_t num_values); + + /* ******************************* */ + u_int32_t ndpi_quick_16_byte_hash(u_int8_t *in_16_bytes_long); /* ******************************* */ |