diff options
author | Luca Deri <deri@ntop.org> | 2023-05-19 11:46:03 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2023-05-19 11:46:03 +0200 |
commit | 5ca6f0ac62d6b2c346bc99d2a1b1200fe9df7917 (patch) | |
tree | d4ba9b547f52c27e8a7f3a65cbb1a0cd1934ca0d /src/include/ndpi_api.h | |
parent | a8b3baf2b8d7f4fffadc7d35a335ddd2c76770c2 (diff) |
Implemented ndpi_predict_linear() for predicting a timeseries value overtime
Diffstat (limited to 'src/include/ndpi_api.h')
-rw-r--r-- | src/include/ndpi_api.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h index 7c5523bd6..ecb6c8271 100644 --- a/src/include/ndpi_api.h +++ b/src/include/ndpi_api.h @@ -1833,6 +1833,22 @@ extern "C" { /* ******************************* */ + /* + * Predicts a value using simple linear regression + * Z-Score = (Value - Mean) / StdDev + * + * @par values = pointer to the individual values to be analyzed [in] + * @par num_values = number of 'values' [in] + * @par predict_periods = number of periods for which we want to make the prediction [in] + * @par prediction = predicted value after 'predict_periods' [out] + * + * @return The number of outliers found + */ + int ndpi_predict_linear(u_int32_t *values, u_int32_t num_values, + u_int32_t predict_periods, u_int32_t *prediction); + + /* ******************************* */ + u_int32_t ndpi_quick_16_byte_hash(u_int8_t *in_16_bytes_long); /* ******************************* */ |