Main Content

Feature Extraction Using Signal Feature Extractor

In Signal Feature Extractor, you can extract features from all members of a labeled signal set including mean, standard deviation, peak, signal-to-noise ratio, mean frequency, band power, and occupied bandwidth. 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 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 the 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 regions of interest for feature extraction. Full-signal feature extraction requires no additional parameters. If you use frame-based regions of interest 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 Rate or Frame Overlap LengthFrame 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 frames or Zero-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, select Drop incomplete frames. To zero-pad the incomplete frame and then include it when computing features, select Zero-pad and include incomplete frames.

Feature Generation

The app uses signalTimeFeatureExtractor and signalFrequencyFeatureExtractor to extract time- and frequency-based features from signals, respectively. Once you define a frame policy, click the Time-Domain Features or the Frequency-Domain Features 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 both domains.

Note

Signal Feature Extractor does not support all features available in the feature extractor objects.

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.

Time-domain features dialog box.

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.

Frequency-domain features dialog box.

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 Time-Domain Features or Frequency-Domain Features 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, where Num is 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 Time-Domain Features or Frequency-Domain Features 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, where Num is 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

Topics