Segment Filters

Segment filters are used to filter out segments based on statistical properties before calling feature generation and classification.

Copyright 2017-2024 SensiML Corporation

This file is part of SensiML™ Piccolo AI™.

SensiML Piccolo AI is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

SensiML Piccolo AI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with SensiML Piccolo AI. If not, see <https://www.gnu.org/licenses/>.

Segment Energy Threshold Filter

Takes the absolute value of each point and compares it with the threshold. If no values are above the threshold, the segment is filtered.

Parameters
  • input_data (_type_) – _description_

  • input_column (_type_) – _description_

  • group_columns (_type_) – _description_

  • threshold (int, optional) – _description_. Defaults to 0.

  • backoff (int, optional) – _description_. Defaults to 0.

  • delay (int, optional) – _description_. Defaults to 0.

  • disable_train (bool, optional) – _description_. Defaults to False.

Returns

The segments that were not filtered.

Return type

DataFrame

Segment Filter MSE

Filters out groups that do not pass the MSE threshold.

Parameters
  • input_column (str) – The name of the column to use for filtering.

  • MSE_target (float) – The filter target value. Default is -1.0.

  • MSE_threshold (float) – The filter threshold value. Default is 0.01.

Returns

The filtered input data.

Return type

DataFrame

Segment Filter Threshold

Filters out segments that have values greater or less than the specified threshold.

Parameters
  • input_column (str) – The name of the column to use for filtering.

  • threshold (int16) – The threshold value to filter against.

  • comparison (int) – 0 for less than, 1 for greater than.

Returns

Segments that pass the energy threshold.

Return type

DataFrame