2.1.6 Building a Model

The Model Building step uses AutoML to build a model that gives you control of the features 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 AutoML settings, you can find that algorithms using half as many resources, while getting 98% accuracy, can be obtained. You can configure the AutoML process to maximize accuracy while fitting it within a desired memory constraint.

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.

Take a look at the pipeline selection screen.

Create a New Pipeline

  1. Click CREATE NEW PIPLELINE to create a new pipeline.

  2. Select “Use AutoML to find the best machine learning algorithm” to automatically find the best machine learning algorithm.

  3. Name the pipeline “My Pipeline” and select the “All Classes” option created in the previous step.

  4. Click CREATE PIPELINE.

Building a Model

After creating a pipeline, a sidebar will pop up, prompting you to set up your pipeline parameters.

  1. Click NEXT.

  2. Set up the Segmenter step with the Windowing Segmenter. Set the "Window Size" 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 100 Hz data, there is a 1 second window size, meaning every 1 second a new classification generates.
  3. (Optional) Open the AutoML Parameters step. This lets you set properties that tell the MPLAB Machine Learning Development Suite how to optimize/prioritize the way it builds your model. This prioritizes specific training algorithms/features or set a size limit on the classifier if your device is limited on SRAM.

  4. Click “Optimize Feature Selector”, then the MPLAB® Machine Learning Development Suite automatically builds you a model to detect your events. This is where the AutoML finds the features needed to build an algorithm that will run on your device.

  5. When the pipeline completes, it displays five models in the AutoML Results view.

    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-versus-resource usage trade off, where the more resources you allocate to modeling, the higher accuracy of a model that can be built.