2.1.5 Querying Data

The query is used to select your sensor data from your project. If you need to filter out certain parts of your sensor data based on metadata or labels, you can specify that here.

Creating a Query

  1. Open the Prepare Data view to create a query.

  2. Create a new query with the session and labels needed to use in your project.

  3. Click SAVE, then MPLAB ML Model Builder counts all the events of interest you labeled in this project, then graph them.

  4. The graph will look similar to this:

The x-axis shows the events in the query and the y-axis shows how many events you selected.

Query Filter

If you discover certain events of interest are bad or not useful while working with your sensor data, you can ignore them in your query by using the “Query Filter”. If you have ever used a database query before, this syntax may be familiar to you.

If you want to ignore the Vertical events in the Slide Demo, you can add the filter:

[Label] IN [Horizontal, Stationary]

You can also filter the metadata values using the Query Filter. In the Slide Demo you can add a Subject filter.

[Label] IN [Horizontal, Stationary] AND [Subject] IN [User001]

This filter would only select the Horizontal and Stationary events done by User001.