Building a Model

The Model Building part of the Analytics Studio uses SensiML’s AutoML to build a model that gives you control of the features you want in your device. For example, if you build an algorithm that detects your events with 100% accuracy, the algorithm may use more resources. But by tweaking parameters in the Build Model tab you might find you can get an algorithm that uses half as many resources, while still getting 98% accuracy. You can configure SensiML’s AutoML process to maximize accuracy while fitting a within a desired memory constraint. This is a powerful concept that can save you a lot of time and money.

The model building process is represented as Pipelines. Each pipeline is a sequence of steps representing the process of data transformation during model building.

Pipelines

A pipeline is a container for a series of data processing steps and contains the blueprint for how your model will be built. It contains the sensor data input parameters, transforms, feature generators, feature selectors, feature transforms and classifiers.

Let’s take a look at the pipeline selection screen

../../_images/analytics-studio-model-building-select-pipeline.png
  • Select a pipeline [1] [2] [3]

  • Create a new pipeline [4]

Create a New Pipeline

  1. Click Build Model to create a new pipeline.

../../_images/analytics-studio-create-pipeline.png
  1. Name the pipeline My Pipeline and click Build

../../_images/analytics-studio-build-model.png

Setup Pipeline Properties

After creating a pipeline you will be taken to the Build Model screen. Let’s look a look at this screen and dive a little deeper

../../_images/analytics-studio-model-building.png
  • Pipeline builder has an advanced mode that allows adding more steps and parameters [1].

  • Each step may have docs information, name, type, special color [2].

  • Each step may be editable (exclude Input Data and steps that have been extracted from a session) [3].

  • Optional steps can be added. Some of them can be added more than 1 time.

  • The AutoML parameters step lets you set properties that tell the Analytics Studio how to optimize/prioritize the way it builds your model. This lets you prioritize specific training algorithms/features or set a size limit on the classifier if your device is limited on SRAM. [6].

Building a Model

  1. Setup the Input Query step with the All Classes query we created in the Querying Data tutorial.

../../_images/analytics-studio-input-query.png
  1. Setup the Segmenter step with the Windowing segmenter. Set size to 100 and slide to 100. Windowing segmentation works well with continuous events.

Note

100 refers to the window size in samples, so by picking Windowing(100) on 100hz data we have a 1 second window size, meaning every 1 second you will get a new classification.

../../_images/analytics-studio-segmenter.png
  1. (Optional) Open the AutoML Parameters step. This lets you set properties that tell the Analytics Studio how to optimize/prioritize the way it builds your model. This lets you prioritize specific training algorithms/features or set a size limit on the classifier if your device is limited on SRAM.

../../_images/analytics-studio-automl-parameters.png
  1. Click Optimize and the Analytics Studio will automatically build you a model to detect your events. This is where SensiML’s AutoML finds the features needed to build an algorithm that will run on your device.

  2. Once the pipeline is complete it will display 5 models in the AutoML Results view.

../../_images/analytics-studio-automl-results.png

There are several summary statistics for each model. You can use this information to select a model that supports your device’s resources while providing the level of accuracy your application needs. Keeping in mind that typically, there is an accuracy vs resource usage trade off, where the more resources you allocate to modeling, the higher accuracy of a model that can be built.