![]() |
Edge AI Add-on API 2.2.0
|
| flt32_t nrf_dsp_var_f32 | ( | const flt32_t * | p_input, |
| uint16_t | num, | ||
| nrf_dsp_stat_ctx_f32_t * | p_ctx ) |
#include <include/nrf_edgeai/dsp/statistic/nrf_dsp_var.h>
Calculate Variance value of a floating-point vector.
This function uses internal accumulator of flt32_t size, for calculating sum of squares of values, so it will lose precision if values less than 10e-4
| [in] | p_input | Pointer to the input vector |
| [in] | num | Number of samples in input vector |
| [in,out] | p_ctx | Optional pointer to the statistics context, this function will use p_ctx->value.sumfor calculation if it exist the calculated value of variance will be written to context for further use |