SensiML Toolkit
2021.01.14

User Guides

  • Getting Started
  • Integrating Custom Devices

User Documentation

  • Data Capture Lab
  • Analytics Studio
  • Knowledge Packs
  • Firmware
  • SensiML TestApp
  • Release Notes

Application Examples

  • Boxing Punch Gesture Recognition
  • Fan State Condition Monitoring

Advanced

  • Analytics Studio Notebook
    • Overview
    • Basics
    • Tutorials
    • Flash Widget
    • Proxy Setup
    • Python Client
    • Pipelines
    • ModelResultSet
    • Grid Search
      • Grid Search Syntax
    • SensiML AutoML
  • Advanced Model Building
  • Pipeline Functions
  • API Methods
  • TensorFlow Lite Tutorial

Simple Streaming Spec

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

SensiML Interface Spec

  • Introduction
  • MQTT Basics
  • Implementation Guide
  • Topic Glossary
  • Implementation Notes
  • References

Resources

  • SensiML
  • Try For Free
  • Contact Us
  • Get Support
  • Dataset Library
SensiML Toolkit
  • »
  • Analytics Studio Notebook »
  • 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 the “dsk.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]}}

Where 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 = dsk.pipeline.grid_search(grid_params)
Next Previous

© Copyright 2020, SensiML Corporation. All rights reserved.