Feature Extraction Using Signal Feature Extractor
In Signal Feature Extractor, you can extract features from all members of a labeled signal set including:
Time-domain features — Mean, standard deviation, RMS, shape factor, crest factor, peak value, impulse factor, clearance factor, SNR, SINAD, and THD.
Frequency-domain features — Mean frequency, median frequency, band power, occupied bandwidth, power bandwidth, peak amplitude, peak location, and Welch's PSD.
Audio features (requires an Audio Toolbox™ license) — Mel spectrogram, mel-frequency cepstral coefficients (MFCC), pitch, spectral centroid, and more.
You can generate attribute or region-of-interest (ROI) feature labels from extracted features that can be used as predictors in machine learning models or to train a deep learning network.
After extraction, you can export features to the MATLAB® Workspace or to the Classification Learner app and save features as labels in your labeled signal set. For more information, see Export Labeled Signal Sets and Features.
Note
The app does not support the extraction of mean, standard deviation, SNR, SINAD, and THD features from complex-valued signals.
Set up Signal Feature Extraction
Before extracting features, you must first define a frame policy to use for extraction. Then, you can choose to Extract Full-Signal Features or Extract Frame-Based Features.
Frame Policy
In the Frame Policy section, select Full-signal to use the full signal, or select Frame-based to use frame- or window-based ROIs for feature extraction. Full-signal feature extraction requires no additional parameters. If you use frame-based ROIs to extract features, you must specify these parameters.
Units — Units to specify frame options. If the imported members do not have time information, the app automatically sets units to samples.
Frame Size — Length of frame in time or samples.
Frame RateorFrame Overlap Length— Frame rate corresponds to the time (or number of samples) between the start of the previous frame and start of the current frame. Frame overlap length corresponds to the overlap between the end of the previous frame and the start of the current frame.Drop incomplete framesorZero-pad and include incomplete frames— The last frame of a signal is incomplete if its length is less than the specified frame size. To exclude the incomplete frame when computing features, selectDrop incomplete frames. To zero-pad the incomplete frame and then include it when computing features, selectZero-pad and include incomplete frames.
Feature Generation
The app uses domain-specific feature extraction objects to extract features from signals. Once you define a frame policy, click the domain-specific feature extractor button in the Feature Generation gallery. Select from the list of features by domain in the dialog box that appears, and specify additional parameters based on your selection. You can add signal features to extract from either one or multiple domains.
Note
Signal Feature Extractor does not support all features available in the feature extractor objects.
Signal Feature Extractor does not support audio feature extraction from full signals. To extract audio features, you must select the Frame-based frame policy and the
Drop incomplete framesprocessing rule
Time-Domain Features. In the time domain, the app computes statistical, pulse metric, and harmonic
features. For more information about time-domain features, see signalTimeFeatureExtractor.

Frequency-Domain Features. In the frequency domain, the app computes frequency, band power, bandwidth,
and spectral peak features from Welch's power spectral density (PSD) estimate of
the time-domain signal. To modify parameters for the bandwidth or spectral peak
features, click the Parameters button next to each
feature to view available options. You can also specify window type, window
length, overlap length, and frequency range used to compute Welch's PSD
estimate. For more information about frequency-domain features, see signalFrequencyFeatureExtractor.

Audio Features. For audio signals, the app computes spectral features, cepstral features,
spectral descriptors, periodicity features, energy features. Specify the window,
number of points at which to calculate the discrete Fourier transform, and audio
features. When you select a feature, the app highlights the selected feature and
any preceding feature that it requires to compute the selected feature. To
modify enabled parameters for highlighted features, click the
Parameters button next to each feature to view
available options. For more information about audio features, see audioFeatureExtractor (Audio Toolbox).

Accelerate Feature Extraction with Parallel Computing
You can accelerate feature extraction by automatically running computations in parallel. Click Use Parallel to enable the parallelization of the feature extraction.
Note
You must have a Parallel Computing Toolbox™ license and enable Use Parallel to use this functionality.
By default, Signal Feature Extractor performs feature extraction in serial. If you enable Use Parallel, then Signal Feature Extractor performs the feature extraction process using a parallel pool of workers if:
An open parallel pool exists.
Automatic pool creation is enabled in the Parallel Settings. For more information on how to control your Parallel Settings, see Specify Your Parallel Settings (Parallel Computing Toolbox).
Otherwise, Signal Feature Extractor does not perform feature extraction and errors out.
For more information about parallel support with MATLAB, see Run MATLAB Functions with Automatic Parallel Support (Parallel Computing Toolbox).
Extract Full-Signal Features
When you extract full-signal features, the app generates attribute feature labels from the extracted features. An attribute feature label describes a signal characteristic corresponding to an extracted feature.
To perform full-signal feature extraction, select Full-signal in the Frame Policy section. In the Feature Generation gallery, select the domain-specific feature extractor to open a dialog box with available features to extract. After selecting features for each domain, click Add Features. Click Use Parallel to enable parallel computation if needed and then click Extract to extract the features.
Extracted features appear in a table
FeatureTable1in the display, listing the frame
limits and the features per channel across the columns, and signals and frames along the
rows. The Feature Definitions browser lists the names of the
features grouped in a tree view under FeatureTable1.
Tip
You can extract features multiple times and select different features each time. Repeat the steps to perform full-signal feature extraction by selecting the new set of features. The app lists the extracted features under the
FeatureTableNum, whereNumis the feature table number.You can delete individual features or feature tables upon feature extraction. In the Feature Definitions browser, locate the feature name or feature table name, right-click and select Delete.
Extract Frame-Based Features
When you extract frame-based features, the app generates ROI feature labels from the extracted features. An ROI feature label describes a signal characteristic over a region of interest corresponding to an extracted feature.
To perform frame-based feature extraction, select Frame-based in the Frame Policy section before generating features. You must also define a frame policy by specifying units, frame size, frame overlap length or frame rate, and the rule to handle an incomplete frame. In the Feature Generation gallery, select the domain-specific feature extractor to open a dialog box with available features to extract. After selecting features for each domain, click Add Features. Click Use Parallel to enable parallel computation if needed and then click Extract to extract the features.
Extracted features appear in a table
FeatureTable1in the display, listing the frame
limits and the features per channel across the columns, and signals and frames along the
rows. The Feature Definitions browser lists the names of the
features grouped in a tree view under FeatureTable1.
Tip
You can extract features multiple times and select different features each time. Repeat the steps to perform frame-based feature extraction by selecting the new set of features. The app lists the extracted features under the
FeatureTableNum, whereNumis the feature table number.You can delete individual features or feature tables upon feature extraction. In the Feature Definitions browser, locate the feature name or feature table name, right-click and select Delete.
See Also
Apps
Objects
signalFrequencyFeatureExtractor|signalTimeFeatureExtractor|audioFeatureExtractor(Audio Toolbox)