Commit b33bfd76 authored by Can Pervane's avatar Can Pervane

Added new features, as given by the following paper:

parent d68beefe
......@@ -24,8 +24,39 @@ def rms(raw_matrix):
return np.hstack(rmsValues)
def meanAbs(raw_matrix):
Calculates the mean of absolute values
meanAbsValues = []
for i in range(raw_matrix.shape[1]):
x = raw_matrix[:,i]
return np.hstack(meanAbsValues)
def std(raw_matrix):
standard deviation of a time series
stdValues = []
for i in range(raw_matrix.shape[1]):
x = raw_matrix[:,i]
return np.hstack(stdValues)
def subBandRatio(raw_matrix, nBands=6):
The ratio of the mean of absolute values, between adjacent columns
Note: This measure was used in a paper where the columns of the matrix represent the
frequency bands
extractors = {
"correlation": correlation,
"coherence": coherence,
"rms" : rms,
"meanAbs": meanAbs,
"std": std,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment