Labeling Signals for AI Tasks with Signal Labeler App
Labeling data is key to building successful AI applications. Using the Signal Labeler app in Signal Processing Toolbox™, you can explore data that needs to be labeled and label attributes, regions of interest, and points through visualization and using custom functions.
Published: 3 Dec 2020
Labeling data is a critical step in supervised machine learning and deep learning workflows. Labeled data is required to train and test the predictive models to perform tasks like signal classification and sequence to sequence classification. The signal labeler app in the signal processing toolbox is an interactive tool that lets you bring in your data and label attributes, regions of interest, and points without needing to write any code.
The signal labeler app can be launched from the MATLAB command line or from the app's gallery. The app can be found in the signal processing and communications section. You can import supported signals from the workspace or bring in data from signal data stores or files.
The signal we have loaded is an electrocardiogram, or ECG signal. ECG signals have three reforms that are of interest. The P wave, T wave, and QRS as complex. We will label these regions of interest, or otherwise, in our signal in the app.
The first step is creating label definitions to attach to the signals. Label definitions provide a detailed description of the labels and help maintain consistency by labeling. We are using an ROI type label here. The next step is labeling the signal. The banner can be used to zoom into and navigate across the signal. You can then start drawing the labels on the signal.
You can also create sub-labels under the main label. Here, I'm adding a sub-label to mark the R peaks in the QRS regions. You can also use the spectrum and time frequency views to investigate your signal in more detail, identify key features, and label, using spectral and time frequency features.
If you are labeling a large data set like this one here, instead of a single signal you can use custom functions to automate labeling. The custom functions use this template. Here we use a function to find the three wave forms in ECG signals.
The automated labeling gallery shows the functions you have added. You can label individual signals using the function and inspect and correct the labels if required. You can then tweak your algorithm to improve the labeling. Once you are happy with the performance of the algorithm, you can choose to auto label multiple signals at once.
Once the signals are labeled, you can export the label signal set into the workspace. The label signal set has the signals and corresponding labels in a single object. You can bring the label signals set back into the app if you want to continue working on it.
If you need help for the app, navigate to the documentation using the Help button on the top right to find all the information you need about the signal labeler. You can also find many examples for the signal labeler app here.