This example shows how to rank features using several classification ranking techniques, how to compare the results, and how to export features from the app. If you want to follow along with the steps interactively, use the data you imported in Process Data and Explore Features in Diagnostic Feature Designer, and use the feature set from that example. Use Open Session to reload your session data using the file name you provided.
When you generate features for classification, you seek the features that perform best at distinguishing among data of different conditions. When you view the histograms, you can get an idea of the relative effectiveness of your features. In this example, you use ranking algorithms to perform this feature comparison more rigorously. Once you have chosen the features you want to retain, you export these features into the MATLAB® workspace.
Rank your features using the default
Click Rank Features. Select
Your selection brings up a ranked list of features, displayed as both a bar chart and a numerical table.
The bar chart legend shows that the initial ranking is performed using
the T-Test algorithm. The chart is normalized to 1 to facilitate visual comparison.
The table displays unnormalized ranking scores. Pause on a bar to get the full
variable name. The highest ranking feature is
has the same value whether it was computed as a signal feature or a rotating
Each ranking algorithm uses different criteria to perform the ranking. In the
Feature Ranking tab, click Supervised
Ranking to bring up a menu that summarizes each method. From that
A Bhattacharyya tab opens with ranking specifications that are standard for all of the techniques. Click Apply.
Apply updates the ranking display with the new results, displayed along with the original T-Test results.
Bhattacharyya technique yields results
that are similar to, but not identical to, the
results. The highest ranking feature is
PeakValue from the
Signal Statistics set. This feature is fourth in the T-test
ranking. The crest factor features are still in the top three.
The ranking is still sorted by
T-Test. Sort instead by
Bhattacharyya. Close the
Bhattacharyya tab and return to the Feature
Ranking tab. Then, select
the Sort by list.
The ranking table now shows
PeakValue at the top.
You have two sets of rankings. Now, delete the
Bhattacharyya results. In the Feature
Ranking tab, select Delete Scores >
Bhattacharyya disappears from the ranking results.
The final step in the Diagnostic Features Designer workflow is to export your features. In the Feature Ranking tab, select Export > Export features to the MATLAB workspace.
Select the features to export. You can sort the features by any of the
rankings you have computed. In this case, only one ranking,
T-Test, is available. The app preselects the top
five features. Modify this selection. Clear the fifth selection and select the sixth
feature using Ctrl-Click.
Your reduced feature table appears in your MATLAB workspace.