Edge AI Add-on API 3.0.0
Loading...
Searching...
No Matches
nrf_edgeai_obsv_metrics.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  nrf_edgeai_obsv_metric_snapshot_t
 Read-only view over one metric's accumulated counters. More...
 
struct  nrf_edgeai_obsv_metric_s
 Observability metric operation table and list node. More...
 

Macros

#define NRF_EDGEAI_OBSV_TM_STORAGE_BYTES(n_classes)
 Minimum byte size of a transition matrix storage buffer for n_classes classes.
 
#define NRF_EDGEAI_OBSV_MCD_NUM_ROWS   3
 Rows of the model certainty descriptor matrix.
 
#define NRF_EDGEAI_OBSV_MCD_STORAGE_BYTES(n_classes)
 Minimum byte size of a model certainty descriptor storage buffer.
 
#define NRF_EDGEAI_OBSV_MED_NUM_ROWS   4
 Descriptor rows: mean energy, max energy, dynamic range, floor ratio.
 
#define NRF_EDGEAI_OBSV_MED_STORAGE_BYTES(n_features)
 Minimum byte size of a mel energy descriptor storage buffer.
 
#define NRF_EDGEAI_OBSV_MSD_NUM_ROWS   8
 Descriptor rows: low/mid/high ratio, centroid, spread, entropy, flatness, contrast.
 
#define NRF_EDGEAI_OBSV_MSD_STORAGE_BYTES(n_features)
 Minimum byte size of a mel spectral descriptor storage buffer.
 
#define NRF_EDGEAI_OBSV_CPD_ROW_GROUPS   2
 Row-group count: the matrix is 2 x num_classes rows (probs, then streak).
 
#define NRF_EDGEAI_OBSV_CPD_STORAGE_BYTES(n_classes)
 Minimum byte size of a class predictions distribution storage buffer for n_classes classes.
 

Typedefs

typedef struct nrf_edgeai_obsv_metric_s nrf_edgeai_obsv_metric_t
 Observability metric operation table and list node.
 

Enumerations

enum  nrf_edgeai_obsv_source { NRF_EDGEAI_OBSV_SOURCE_PROBS = 0 , NRF_EDGEAI_OBSV_SOURCE_FEATURES = 1 }
 Data stream a metric consumes. More...
 
enum  nrf_edgeai_obsv_metric_id {
  NRF_EDGEAI_OBSV_METRIC_ID_MODEL_CERTAINTY_DESC = 1 , NRF_EDGEAI_OBSV_METRIC_ID_CLASS_PRED_DIST = 2 , NRF_EDGEAI_OBSV_METRIC_ID_TRANSITION_MATRIX = 3 , NRF_EDGEAI_OBSV_METRIC_ID_MEL_ENERGY_DESC = 4 ,
  NRF_EDGEAI_OBSV_METRIC_ID_MEL_SPECTRAL_DESC = 5
}
 Metric identifier values emitted by each metric's snapshot. More...
 
enum  nrf_edgeai_obsv_med_config { NRF_EDGEAI_OBSV_MED_CFG_SCALE_P01_MILLI = 0 , NRF_EDGEAI_OBSV_MED_CFG_SCALE_P99_MILLI = 1 , NRF_EDGEAI_OBSV_MED_CFG_COUNT }
 Layout of the config row reported by the mel energy descriptor. More...
 
enum  nrf_edgeai_obsv_cpd_config { NRF_EDGEAI_OBSV_CPD_CFG_STREAK_TOP = 0 , NRF_EDGEAI_OBSV_CPD_CFG_STREAK_TOL = 1 , NRF_EDGEAI_OBSV_CPD_CFG_COUNT }
 Layout of the config row reported by the class predictions distribution. More...
 

Functions

void nrf_edgeai_obsv_metric_tm_create (nrf_edgeai_obsv_metric_t *metric, void *buf, uint16_t n_classes)
 Initialize a transition matrix metric using caller-provided storage.
 
void nrf_edgeai_obsv_metric_mcd_create (nrf_edgeai_obsv_metric_t *metric, void *buf, uint16_t n_classes)
 Initialize a model certainty descriptor metric using caller-provided storage.
 
void nrf_edgeai_obsv_metric_med_create (nrf_edgeai_obsv_metric_t *metric, void *buf, uint16_t n_features)
 Initialize a mel energy descriptor metric using caller-provided storage.
 
void nrf_edgeai_obsv_metric_msd_create (nrf_edgeai_obsv_metric_t *metric, void *buf, uint16_t n_features)
 Initialize a mel spectral descriptor metric using caller-provided storage.
 
void nrf_edgeai_obsv_metric_cpd_create (nrf_edgeai_obsv_metric_t *metric, void *buf, uint16_t n_classes)
 Initialize a class predictions distribution metric using caller-provided storage.