ESPectre SDK 2.8.0-280-gac7af68
Wi-Fi CSI motion sensing for ESP32 firmware
Loading...
Searching...
No Matches
csi_features.h File Reference
#include <algorithm>
#include <cmath>
#include <cstdint>
#include "utils.h"

Go to the source code of this file.

Classes

struct  espectre::MLSeriesStats
struct  espectre::MLStatNeeds
struct  espectre::MLSeriesScratch

Namespaces

namespace  espectre

Enumerations

enum  espectre::MLFeatureId : uint8_t {
  espectre::ML_FEAT_TURB_AUTOCORR = 6 , espectre::ML_FEAT_TURB_ZCR = 14 , espectre::ML_FEAT_L1_DELTA_LAG_RATIO = 25 , espectre::ML_FEAT_TURB_IQR_OVER_MEAN_AGGR = 45 ,
  espectre::ML_FEAT_CHAN_SHAPE_COHERENT_INNOVATION_ENERGY = 46 , espectre::ML_FEAT_CHAN_SHAPE_EXCESS_PATH = 47 , espectre::ML_FEAT_CHAN_SHAPE_SPREAD_SUBBAND = 48 , espectre::ML_FEAT_CHAN_SHAPE_SUBBAND_KENDALL_LAG_EXCESS = 49
}
enum class  espectre::MLFeatureSource : uint8_t { espectre::TURBULENCE_SERIES , espectre::AGGREGATED_TURBULENCE_SERIES , espectre::L1_TRACKER , espectre::CHANNEL_SHAPE_TRAJECTORY_TRACKER }

Functions

MLFeatureSource espectre::ml_feature_source (MLFeatureId id)
bool espectre::ml_feature_needs_l1_tracker (uint8_t id)
bool espectre::ml_feature_needs_channel_shape_trajectory_tracker (uint8_t id)
bool espectre::ml_feature_needs_aggregated_turbulence (uint8_t id)
float espectre::median_from_sorted (const float *sorted_values, uint16_t count)
float espectre::percentile_from_sorted (const float *sorted_values, uint16_t count, float quantile)
float espectre::order_statistic_in_place (float *values, uint16_t count, uint16_t index)
float espectre::percentile_in_place (float *values, uint16_t count, float quantile)
float espectre::calc_autocorrelation (const float *values, uint16_t count, float mean, float variance, uint16_t lag=1)
float espectre::calc_zero_crossing_rate (const float *values, uint16_t count, float center)
MLStatNeeds espectre::ml_series_needs (const uint8_t *feature_ids, uint8_t num_features, MLFeatureSource wanted)
void espectre::compute_ml_series_stats (const float *values, uint16_t count, MLSeriesStats *out, const MLStatNeeds &needs, const MLSeriesScratch &scratch)
float espectre::ml_feature_value_from_stats (uint8_t id, const MLSeriesStats &turb, const MLSeriesStats &aggregated_turb, float l1_delta_lag_ratio, float chan_shape_spread_subband, float chan_shape_coherent_innovation_energy, float chan_shape_excess_path, float chan_shape_subband_kendall_lag_excess)
 Resolve one exported ML feature from precomputed series and tracker stats.
void espectre::extract_ml_features_by_id (const float *turb_buffer, uint16_t turb_count, const float *aggregated_turb_buffer, uint16_t aggregated_turb_count, const uint8_t *feature_ids, uint8_t num_features, float *features_out, const MLSeriesScratch &series_scratch, float l1_delta_lag_ratio, float chan_shape_spread_subband, float chan_shape_coherent_innovation_energy, float chan_shape_excess_path, float chan_shape_subband_kendall_lag_excess)

Variables

constexpr uint8_t espectre::L1_DELTA_LAG = 10
constexpr float espectre::L1_DELTA_STARTUP_THRESHOLD_FACTOR = 1.1f
constexpr uint8_t espectre::TURB_IQR_AGGREGATION_WIDTH = 5U