Feature extraction

Basic feature extraction

breze.learn.feature.rbf(X, n_centers)

Return a design matrix with features given by radial basis functions.

n_centers Gaussian kernels are placed along data dimension, equidistant between the minimum and the maximum along that dimension. The result then contains one column for each of the Kernels.

Parameters:
  • X – NxD sized array.
  • n_centers – Amount of Kernels to use for each dimension.
Returns:

Nx(n_centers * D) sized array.

Feature extraction for EMG and similar time series data

Module that holds various preprocessing routines for emg signals.

breze.learn.feature.emg.integrated(X)

Return the sum of the absolute values of a signal.

Parameters:X – An (t, n, d) array where t is the number of time steps, n is the number of different signals and d is the number of channels.
Returns:An (n, d) array.
breze.learn.feature.emg.mean_absolute_value(X)

Return the mean absolute value of the signal.

Parameters:X – An (t, n, d) array where t is the number of time steps, n is the number of different signals and d is the number of channels.
Returns:An (n, d) array.
breze.learn.feature.emg.modified_mean_absolute_value_1(X)

Return a weighted version of the mean absolute value.

Instead of equal weight, the first and last quarter of the signal are only weighed half.

breze.learn.feature.emg.modified_mean_absolute_value_2(X)

Return a weighted version of the mean absolute value.

The central half of the signal has weight one. The beginning and the last quarter increase/decrease their weight towards that.

Parameters:X – An (t, n, d) array where t is the number of time steps, n is the number of different signals and d is the number of channels.
Returns:An (n, d) array.
breze.learn.feature.emg.mean_absolute_value_slope(X)

Return the first derivative of the mean absolute value.

Parameters:X – An (t, n, d) array where t is the number of time steps, n is the number of different signals and d is the number of channels.
Returns:An (n, d) array.
breze.learn.feature.emg.variance(X)

Return the variance of the signals.

Parameters:X – An (t, n, d) array where t is the number of time steps, n is the number of different signals and d is the number of channels.
Returns:An (n, d) array.
breze.learn.feature.emg.root_mean_square(X)

Return the root mean square of the signals.

Parameters:X – An (t, n, d) array where t is the number of time steps, n is the number of different signals and d is the number of channels.
Returns:An (n, d) array.
breze.learn.feature.emg.zero_crossing(X, threshold=1e-08)

Return the amount of times the signal crosses the zero y-axis.

Parameters:
  • X – An (t, n, d) array where t is the number of time steps, n is the number of different signals and d is the number of channels.
  • threshold – Changes below this value are ignored. Useful to surpress noise.
Returns:

An (n, d) array.

breze.learn.feature.emg.slope_sign_change(X, threshold=1e-08)

Return the amount of times the signal changes slope.

Parameters:
  • X – An (t, n, d) array where t is the number of time steps, n is the number of different signals and d is the number of channels.
  • threshold – Changes below this value are ignored. Useful to surpress noise.
Returns:

An (n, d) array.

breze.learn.feature.emg.willison_amplitude(X, threshold=1e-08)

Return the amount of times the difference between two adjacent emg segments exceeds a threshold.

Parameters:
  • X – An (t, n, d) array where t is the number of time steps, n is the number of different signals and d is the number of channels.
  • threshold – Changes below this value are ignored. Useful to surpress noise.
Returns:

An (n, d) array.