Main Content

Generate Features Automatically in Diagnostic Feature Designer

When you import data into Diagnostic Feature Designer, you can apply specific data processing and feature extraction options to generate and rank a feature set from your data. You can also generate and rank a feature set automatically using Auto Features. When you select one or more signals or spectra, Auto Features computes a predefined set of features that are appropriate for the variable type. The automatic computations include:

  • Deriving intermediate variables to use for feature extraction, such as spectra and time series signals

  • Extracting the features from the expanded variable set

  • Ranking the features and plotting the histograms of top-ranked features.

With Auto Features, you can generate both general and rotating machinery features.

  • General features are standard metrics that can be applied to any signal (for signal features) or spectrum (for spectral features). The software uses default parameters for these features.

  • Rotating machinery features are derived from specialized computations that incorporate rotation rate.

The following figure illustrates the computation flow for general and rotating machinery features.

The flow for general features is on the top. The flow for rotating machinery features is on the bottom. The basic computation for both types of feature is, from left to right: inputs, data processing, feature extraction, features.

To use Auto Features, perform the following general steps:

  1. Select a variable, such as a signal or spectrum, in the Variables pane. To select more than one variable, use Ctrl-click to add to the variable selection. The variables do not have to have the same data type.

  2. In the Feature Designer tab, click Auto Features.

  3. Confirm the computational settings in the Configuration pane of the Auto Features dialog box.

  4. In the Features to Generate pane, select Standard for general features, Rotating Machinery for rotating machinery features, or both.

  5. In the Settings pane, specify general and, if you are selecting rotating machinery features, rotating machinery information.

    • General tab: choose whether to plot the histograms and specify the number of top-ranked features to plot.

    • Rotating Machinery tab:

      • Specify the rotation rate as a constant RPM value or as a tacho signal from your variables list. if you specify a tacho signal, also specify the number of pulses per rotation

      • Specify the TSA filter domain as either order or frequency and provide the orders of rotation in the machinery.

  6. Click Compute.

Once you have generated the feature set, you can continue to derive new variables and add new features. Alternatively, you can immediately export the feature set directly to Classification Learner.

The following sections provide more information about the general workflow.

Set Up Auto Features Computation

To set up an Auto Features computation, select one or more variables and, in the Feature Designer tab, click Auto Features.

The selected variable is in the middle of the column on the left. The Auto Features button is the fourth item in the toolstrip at the top.

The Configuration pane of the Auto Features dialog box displays information that includes the selected variables, the feature table to add features to, and the number of features to generate. In the following example figure, a selection of a specific signal results in the app identifying 108 time-domain features and 6 frequency-domain features for generation. These features include both general and rotating machinery features.

The Auto Features dialog box contains the Configuration pane on the top, the Features to Generate pane in the middle and the Settings pane on the bottom.

The Configuration pane also lists the status of computational options such as parallel computing. If you want to change any of these options or if you want to add an additional variable for feature generation, click Cancel, and make the necessary changes in the app options and variable selections. Then click Auto Features once more to proceed.

The General tab of the Settings pane lets you choose to plot the histograms automatically after the features are generated and ranked. To do so, select Plot feature histograms, and then specify the number of top features to show.

The Rotating Machinery tab of the Settings pane lets you specify the rotation rate and filter domain. In the following example figure, the rotation rate is set to the tacho signal Tacho/Data and the TSA filter domain is set to Order, with a rotation order of 1.

In the Rotating Machinery tab, the properties are, from top to bottom, Constant RPM,Tacho signal, Pulses per rotation, TSA filter domain, and Rotation orders.

Once you are satisfied with the configuration and the settings, click Compute.

View New Variables and Ranked Features

When the feature computations are complete, the app plots the feature ranking. The Variables pane includes new derived variables that the app computed to support feature generation. For example, in the following figure, two new derived spectrum variables provide sources for spectral features.

The variables are in the column on the left. The spectrum variable is near the bottom of the variables pane. The feature ranking plot is in the middle. The corresponding feature scores are on the right.

You can use Compact view to view more variables in the same space. Right-click on any variable to access the compact view option. In the following figure, selecting Compact view collapses each variable to the main variable name.

The default expanded variable display is on the left. The Compact view option is the third and last item in the menu to the right of the expanded variables. The resulting compacted view is on the right.

The derived variable names include the last processing step that was used to compute them. For example, in the following figure, Vibration_res is a residual signal that is computed by subtracting a reference signal such as the mean value of the signal ensemble.

To view the generated features, scroll down in the Variables pane. To obtain more information about a feature, such as what variable the feature is derived from, select the feature and then view the feature information in the Details pane. You can also use the Details pane for information on variables. In the following figure, the Details pane shows that the ClearanceFactor feature from the Vibration_res_sigstats feature group is derived from the Vibration_res signal.

ClearanceFactor is at the top of the feature list that is directly under Vibration_res_sigstats. The Details pane is on the bottom.

To view more information about the processing history of a feature, click History. The following figure illustrates the sequence of serial and parallel processing steps that led to ClearanceFactor.

The history plot shows two paths starting with Vibration data and converging at Vibration_res/Data in the middle. A single path leads from Vibration_res/Data to the ClearanceFactor feature.

For some features, the app uses tunable parameters in the computation. To view the parameter values, click Parameters. The following figure shows the parameter values for the spectral feature PeakAmp1.

Parameter names are on the left. Parameter values are on the right.

If you selected the option to plot histograms automatically, you can view them by selecting the Histogram plot tab next to the Feature Ranking plot tab.

Add Additional Variables and Features

After you generate your first set of features using Auto Features, you can continue to select variables for automatic or manual processing and feature extraction. If you apply Auto Features to variables that Auto Features previously derived, the new features will be duplicates. However, if you create new variables yourself, Auto Features generates distinct features.

For example, the default spectral processing option that Auto Features uses is Welch. Suppose that you create a separate spectrum variable using the Autoregressive option. Select that new spectrum, Vibration_ps_1, for Auto Features to see that there are three available features. Since Auto Features did not use this spectrum variable to generate the initial feature set, these features are distinct from the spectral features that Auto Features generated previously.

The Variables pane with the selection of the new spectral variable Vibration_ps_1/Spectrum data is on the left. The Auto Features dialog box is on the right.

The new features are ranked along with the existing features. In the following figure, two of the new spectral features are ranked eighth and ninth.

Features extracted from the new spectrum value are in the eighth and ninth positions in the list on the right.

Because Auto Features dialog box for this example is set to the default value of 5, the set of histogram plots for FeatureTable1 does not include the new features. If you decide you want to see additional histograms, select the feature table. Then, in the Histogram tab, click Select Features.

The Select Features button is in the upper left-hand corner.

A dialog box that displays the features in ranked order allows you to select additional features.

The feature list contains feature names with a check box to the left of each name. The first five check boxes and the eighth and ninth check boxes contain check marks.

For more information on Select Features, see Feature Selector.

Delete Features from App

When you use Select Features, you hide features that you do not select, but they remain in the feature table. You can also delete features completely from the app. Use this capability to permanently remove features that you do not want to view or use.

The app provides multiple ways to delete features:

  • By name: In the Variables pane, select a feature, features, or feature table to delete by name. Right-click and then select Delete Features.

    Variables pane. Multiple nonadjacent features are selected. The context menu to the right of the pane has the Delete features option selected.

  • By rank: In the Feature-Ranking tab, delete features using one of the following methods:

    • Select low-ranked features in the ranking table, right-click, and select Delete Features.

    • In the Delete section of the tab, specify the ranking method to use as a deletion criterion. Then, specify the lowest ranking position to retain and click Delete. The app deletes all features that are ranked below the specified position. For example, if there are 13 features and you specify a rank of 5, then the app deletes the lowest eight features.Deletion by rank. The Delete section, with Features below rank set to 5. The ranking graph and ranking table beneath the tab use color to indicate the corresponding features to be deleted.

When the app deletes the features, it also removes the features from previously generated plots, such as histogram or feature trace plots.

Next Steps

You can now continue to process your variables and add new features. You can also export your feature set to your MATLAB® workspace or to Classification Learner.

The Export button is in the top right-hand corner. A menu is directly underneath the button. In the menu, the Export features to the Classification Learner selection is the second row from the top

See Also

Related Topics