SensiML Toolkit
2025.01.08

User Guides

  • Getting Started

Application Examples

  • Keyword Spotting
  • Boxing Punch Activity Recognition
  • Canine Activity Recognition Collar
  • Robot Arm Motion Recognition and Anomaly Detection
  • Fan State Condition Monitoring
  • Audio Anomaly Detection
  • Vibration Anomaly Detection
  • Audio Cough Detection
  • Guitar Note Audio Recognition
  • Smart Lock Audio Recognition
  • Wizard Magic Wand Gesture Game

Third-Party Devices Integration

  • Introduction
  • Data Collection Firmware
  • Building Recognition Firmware
  • Interfacing with the SensiML TestApp

User Documentation

  • Data Studio
  • Analytics Studio
  • SensiML TestApp
  • Open Gateway
  • SensiML Python SDK
    • Overview
    • Installation/Setup Instructions
    • Jupyter Notebook Basics
    • Initializing the SensiML Python SDK
    • Proxy Setup
    • Getting Started with the SensiML Python SDK
    • API Methods
      • Overview
      • SensiML
      • Projects
      • Pipelines
      • Captures
      • Metadata
      • Labels
      • Segments
      • Sessions (Segmenters)
      • Queries
      • Capture Configuration
      • Knowledge Packs
      • Knowledge Pack Runner
      • CSV Upload
      • Platforms
      • DCLProject
      • DataSegments
      • Grid Search
        • Grid Search Syntax
      • ModelResultSet
    • Additional Tutorials
    • Release Notes
  • Knowledge Packs / Model Firmware
  • Machine Learning / Digital Signal Processing

Supported Compilers

  • Android Native Development Kit
  • Arm GCC Cortex M4/M7/A53
  • Espressif ESP-IDF ESP32
  • Microchip XC8/XC16/XC32
  • x86_64 (GCC 9.2/mingw-64 9.3)

Supported Devices

  • Arduino Nano 33 BLE Sense
  • Arduino Nicla Sense ME
  • Infineon PSoC™ 6
  • M5Stack M5StickC PLUS ESP32-PICO Mini IoT Dev Kit
  • Microchip Technology AVR128DA48 Curiosity Nano Evaluation Kit
  • Microchip Technology PIC-IoT WG Development Board
  • Microchip Technology SAMD21 ML Eval Kit (SAM-IoT WG)
  • Nordic Thingy
  • onsemi RSL10 Sense
  • QuickLogic Chilkat
  • QuickLogic QuickAI
  • QuickLogic QuickFeather
  • Raspberry Pi
  • Silicon Labs Thunderboard Sense 2
  • Silicon Labs xG24 Dev Kit
  • SparkFun QuickLogic Thing Plus - EOS S3
  • ST SensorTile
  • ST SensorTile.box

Simple Streaming Interface

  • Introduction
  • Describing Output Data
  • Sending Output Data
  • Simple Stream With Wi-Fi
  • Simple Stream With BLE
  • Validating Device Output

MQTT-SN Interface

  • MQTT-SN Documentation

Resources

  • SensiML
  • Try For Free
  • Contact Us
  • Get Support
  • Dataset Library
SensiML Toolkit
  • »
  • SensiML Python SDK »
  • API Methods »
  • Grid Search

Grid Search

Optimizing model performance often requires searching over a large parameter space. SensiML analytics engine also supports grid search over pipeline parameters. After you have created a pipeline you can specify which parameters to search over. On the server side we take advantage of the pipelines ability to parallelize, as well as performing optimizations for training algorithms to speed up the computation. This makes it possible to search large parameter spaces quickly and efficiently. After performing the grid search we rank each pipeline based on the f1 score, precision and sensitivity so that you can choose the best performing combination to build a Knowledge Pack with.

Grid Search Syntax

After you have created a pipeline, you can call client.pipeline.grid_search() and pass in a list of grid_params to search over.

Grid params is a nested python dictionary object.

grid_params = {"Name Of Function":{"Name of Parameter":[ A, B, C]}}

A, B, and C are the parameters to search over. Additionally, for each step you may want to search over more than one of a functions configurable parameters. To do this simply add another element to the functions dictionary.

grid_params = {"Name Of Function":{"Name of Parameter 1":[ A, B, C],
                                      "Name of Parameter 2":[ D, E]}
                                  }

This will tell grid search to search over 6 different parameter spaces.

You can also specify more than one step to search over in grid params. This is done through simply adding another element to the Function level of the grid_params dictionary.

grid_params = {"Name Of Function":{"Name of Parameter 1":[ A, B, C],
                                "Name of Parameter 2":[ D, E]},
               "Name of Function 2":{"Name of Parameter":[1, 2, 3, 4, 5, 6]}}

To access the grid parameter space, use the name of the training algorithm as shown in the example below to iterate over the parameter space of the pipeline described in the Pipelines section of this documentation.

grid_params = {'Windowing': {"window_size": [25,50,75,100,125], 'delta':[100]},
              'selector_set': {"Recursive Feature Elimination": {'number_of_features':[5,10,20]}},
              'Hierarchical Clustering with Neuron Optimization': {'number_of_neurons':[5,10,]}
            }

results, stats = client.pipeline.grid_search(grid_params)
Previous Next

© Copyright 2022, SensiML Corporation. All rights reserved.