A 'pure' implementation of the feature extraction process. This function is not normally called directly.

sensor_features(
  sensor_data,
  transform = NULL,
  extract = NULL,
  extract_on = NULL,
  models = NULL
)

Arguments

sensor_data

A dataframe.

transform

A function or list of functions to be applied sequentially to sensor_data.

extract

A function or list of functions to be applied to each of the columns in extract_on from the output of transform. Each function should return a single-row dataframe of features. If the output of transform has incidental columns (columns not contained in either the grouping columns of transform nor extract_on, they will be preserved in the outputted features.

extract_on

A string or list of column names to compute features from. If NULL, features will be extracted from all non-grouped columns.

models

A function or list of functions which accept the output from transform as input and output features.

Value

A list of features. The output from extract will be stored under $extracted_features and the output from models will be stored under $model_features. If transform returns an error dataframe (see has_error), the error dataframe is stored under $error.

Details

The feature extraction paradigm is implemented as such:

Input: raw sensor data Transform: into a format suitable for calculating statistics upon Extract: features by computing statistics upon individual columns within grouped rows -- or by using a model Return: A list of features