Main Content

Rank Features Using Signal Feature Extractor

After feature extraction, you can rank and export ranked features to the MATLAB® Workspace or to the Classification Learner app and save features as table, matrix, or predictors.

Note

Rank Extracted Signal Features

To enter the feature ranking mode, click Rank Features from the Ranking section of the Extract Features toolstrip. To rank features, Select Response Label and Feature Group and Select Feature Ranking Algorithm.

Select Response Label and Feature Group

By default, the app uses the first imported response label and the latest feature group to rank features. To specify a response label and feature group for feature ranking, navigate to the Data section of the Ranking toolstrip and follow these steps.

  • Select the name of the variable with the response labels from the Response Label drop-down list in the Data section.

  • Select the name of the feature group table Group Name drop-down list in the Data section.

  • Click Apply. The app updates the list of features for ranking.

Select Feature Ranking Algorithm

Signal Feature Extractor ranks all the features from the specified response label and feature group selections. When you select a feature ranking algorithm, Signal Feature Extractor ranks the features by assigning an importance scores to each ranked feature. Your selection brings up a ranked list of features, displayed as both a bar chart and a numerical table that displays the ranking scores in descending order. You can choose a feature ranking algorithm from the following list.

Feature Ranking AlgorithmSupported Data TypeDescription
MRMRCategorical and continuous features

Rank features sequentially using the Minimum Redundancy Maximum Relevance (MRMR) Algorithm (Statistics and Machine Learning Toolbox).

For more information, see fscmrmr (Statistics and Machine Learning Toolbox).

Chi2Categorical and continuous features

Examine whether each predictor variable is independent of the response variable by using individual chi-square tests, and then rank features using the p-values of the chi-square test statistics. Scores correspond to –log(p).

For more information, see fscchi2 (Statistics and Machine Learning Toolbox).

ReliefFEither all categorical or all continuous features

Rank features using the ReliefF (Statistics and Machine Learning Toolbox) algorithm with 10 nearest neighbors. This algorithm works best for estimating feature importance for distance-based supervised models that use pairwise distances between observations to predict the response.

For more information, see relieff (Statistics and Machine Learning Toolbox).

ANOVACategorical and continuous features

Perform one-way analysis of variance for each predictor variable, grouped by class, and then rank features using the p-values. For each predictor variable, the app tests the hypothesis that the predictor values grouped by the response classes are drawn from populations with the same mean against the alternative hypothesis that the population means are not all the same. Scores correspond to –log(p).

For more information, see anova1 (Statistics and Machine Learning Toolbox).

Kruskal WallisCategorical and continuous features

Rank features using the p-values returned by the Kruskal-Wallis Test (Statistics and Machine Learning Toolbox). For each predictor variable, the app tests the hypothesis that the predictor values grouped by the response classes are drawn from populations with the same median against the alternative hypothesis that the population medians are not all the same. Scores correspond to –log(p).

For more information, see kruskalwallis (Statistics and Machine Learning Toolbox).

Export Ranked Features

As you rank features in this mode, you can export these features to the MATLAB Workspace or to the Classification Learner (Statistics and Machine Learning Toolbox) app. To export all the features you generate along with all your labels and signal data, close the Ranking mode and export the labeled signal set using Export on the Extract Features tab.

Export to MATLAB Workspace

To export features to the MATLAB Workspace, select Workspace from the Export drop-down list. In the Export Features to Workspace dialog box, select the top features, all the features, or specific features you want to export and then click Export.

Tip

Use Ctrl+click to select multiple features.

Export ranked features to workspace dialog box.

Before the app exports the selected features, you must specify a name and format for the output. You can output the features as either a table or matrix, where each column corresponds to a feature label and each row corresponds to a member.

Export ranked features to workspace dialog box to specify output name and format.

Export to Classification Learner App

To export features to the Classification Learner (Statistics and Machine Learning Toolbox) app, select Classification Learner from the Export drop-down list. In the Export Features to Classification Learner dialog box, select the top features, all the features, or specific features you want to export and then click Export. Once you export the selected features, the Classification Learner app opens automatically with the feature table visible in the new session dialog box. In this workflow, Classification Learner considers the features as predictors.

See Also

Apps

Objects

Topics