Skip to content

Instantly share code, notes, and snippets.

@josephbima
josephbima / features.py
Last active September 18, 2020 21:53
This code extracts the feature we have chosen from the data (window)
def _compute_mean_features(window):
"""
Computes the mean x, y and z acceleration over the given window.
"""
return np.mean(window, axis=0)
def _compute_std_features(window):
'''
Computes the standard deviation of x, y and z acceleration over the given window.