To improve the accessibility of our content, please find the audio version of this blog post.
We recently published a series of videos on machine learning core. We also recently released an even more powerful version, the LSM6DSRX, for designs that don’t prioritize power savings but are looking for greater accuracy. Whether engineers use the LSM6DSOX or the LSM6DSRX, the new step-by-step tutorials are an essential starting point in anyone’s workflow. Professionals know that there is no real substitute for a deep dive in datasheets and technical documentation. However, these new videos go a lot deeper than the and provide a practical and reliable introduction to Unico GUI to more rapidly take advantage of our components’ features.. The tutorials use the LSM6DSOX, a highly symbolic MEMS, as it was the first in the industry to integrate a
Mightier Than the Sword
The video series starts by looking at a smart pen. This approach allows engineers to envision a small design and a pragmatic approach. Instead of writing a sophisticated algorithm, developers can simply use the machine learning core to detect if the user is holding the pen or writing. Not only is the implementation simpler, the system demands only 0.55 mA. The Unico GUI video tutorials also serve as an introduction to data analysis and the creation of a decision tree. Hence, this series of videos use the MEMS to offer foundational knowledge that applies to more than just a component.
Unico GUI: Data Science
The LSM6DSOX Step-By-Step Tutorial series teach data collection by using the Unico GUI. A user can record the movements of a sensor board connected to the PC. In the video example, the presenter is using the STEVAL-MKI109V3 motherboard and the STEVAL-MKI197V1 daughter card, which includes the LSM6DSOX. However, it is also possible to use the STEVAL-MKI195V1, which houses the LSM6DSRX and replicate everything in the tutorials.
Unico GUI collects and stores the data for each class of action that the pen will need to recognize. It is, therefore, a particularly important video because engineers often face issues with data collection. Not every company has the luxury of having a resident data scientist that can gather, clean, and package large data sets to software developers. Being able to do it from Unico GUI thus offers a unique advantage, especially when the goal is to design proofs-of-concept or early prototypes.
Data Labeling and Overall Configuration
The next lesson in the Unico GUI videos pertains to labeling. Data points in and of themselves are just values in a text file. In a supervised setting, they mean nothing to the system unless users label them appropriately. This is a simple, but essential phase because labeling means developers define the features that the decision tree will recognize. In the videos, the presenter labels the data as steady (pen on the table, not in hand), idle (pen in hand, not writing), writing, and others (random movements). Without these labels, the LSM6DSOX can’t recognize these various classes.
Additionally, developers need to set up the main characteristics of their decision tree. One example is the number of samples the system will analyze every second before making a decision. Engineers must also determine the number of decision trees they will require. It is easy to overlook this aspect of the process, but a machine learning core with imprecise configuration will be unreliable. Even with the best data possible, it’s crucial to test various settings as they can tremendously impact accuracy. Hence, the ability to label and configure within Unico GUI vastly facilitates workflows and favors experimentations.
Unico GUI: Machine Learning Core
Generating a Decision Tree
Developers are now able to generate a decision tree. The first step, however, is assigning an 8-bit value (from 0 to 15) for each class or feature. In the LSM6DSOX Step-By-Step Tutorials, Steady is 0, Idle is 4, Writing is 8, and Others is 12. Unico GUI can then generate the decision tree that engineers will load onto the LSM6DSOX. Additionally, the video shows how to create the same tree with Weka. It might surprise viewers that we show how to use other tools in a series of videos dedicated to Unico GUI. The ST philosophy is always to give our users the freedom to utilize the tools that they know best.
When using Weka, users simply need to export the data from Unico GUI as Attribute-Relation Files (ARFF). In this example, we see that using Weka opens developers to other algorithms and additional information about their decision tree. In the video example, the presenter uses Weka to show the confusion matrix, which is essential when trying to anticipate the accuracy of an algorithm and potentially spot a high number of false positives or false negatives. Weka also helps users visualize the data distribution of various features to determine the importance of certain features.
Testing the Decision Tree
The last step in the process is to upload the decision tree onto the sensor; the LSM6DSOX in this tutorial. Put simply, each class, defined during the labeling phase, has its counter. As the machine learning core processes the data captured, it increases or decreases these counters. At the end of the evaluation, the system will output an 8-bit value and store it in a register.
This last video is interesting because it shows how developers can load their register configuration and visualize the decision tree at work. Unico GUI offers a panel that displays the output from the machine learning core stored in the register. When the pen is idle, we see the register storing a 4, whereas writing changes this value to 8. This is a particularly practical debugging tool because developers can see if there are any significant issues without having to write a single line of code.