Flatten

The Flatten block performs statistical analysis on the signal. It is useful for slow-moving averages like temperature data, in combination with other blocks.

GitHub repository containing all DSP block code: edgeimpulse/processing-blocks.

Flatten parameters

Normalize features

To enable data normalization, you can use the Normalize features option in the processing blocks generate features tab. This will learn the mean and standard deviation of each output column during the feature generation step, and apply a normalization step during training and inference.

Normalize features

When enabled, the block learns the mean and standard deviation of every output column during Generate features, then applies a normalization step at training and inference. Recommended when raw numeric ranges differ by more than ~10×. see Why normalize? for more details.

Scaling

  • Scale axes: Multiplies axes by this number

Method

  • Average: Calculates the average value for the window

  • Minimum: Calculates the minimum value in the window

  • Maximum: Calculates the maximum value in the window

  • Root-mean square: Calculates the RMS value of the window

  • Standard deviation: Calculates the standard deviation of the window

  • Skewness: Calculates the skewness of the window

  • Kurtosis: Calculates the kurtosis of the window

  • Moving Average Number of Windows: Calculates the moving average by maintaining a rolling average of the last N windows. Note, there is no zero padding, the block will accumulate averages up to N windows. (Ex. for the first window in a sample, the moving average will equal the average). The moving average resets for each sample during training, and during inference, when run_classifier_init() is called. Note if you enable this, you probably don't want overlapping windows for training.

How does the flatten block work?

The Flatten block first rescales axes of the signal if value is different than 1. Then statistical analysis is performed on each window, computing between 1 and 8 features for each axis, depending on the number of selected methods.

Last updated

Was this helpful?