Extraction Frequency
Extraction Frequency
compute_frequency_features(x)
Returns the spectral centroid (mean), variance, skew, and kurtosis of the absolute fourier transform spectrum.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
array
|
the time series on which the spectral features are calculated |
required |
Returns:
Type | Description |
---|---|
array
|
An array containig the spectral centroid, variance, skew, and kurtosis of the absolute fourier transform spectrum. |
Source code in ceruleo/transformation/features/extraction_frequency.py
get_centroid(y)
Compute the centroid of the input distribution (aka distribution mean, first moment)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y |
array
|
the discrete distribution from which one wants to calculate the centroid |
required |
Returns:
Type | Description |
---|---|
float32
|
The centroid of distribution y |
Source code in ceruleo/transformation/features/extraction_frequency.py
get_kurtosis(y)
Calculates the kurtosis as the fourth standardized moment. (Ref: https://en.wikipedia.org/wiki/Kurtosis#Pearson_moments)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y |
array
|
the discrete distribution from which one wants to calculate the kurtosis |
required |
Returns:
Type | Description |
---|---|
float32
|
The kurtosis of distribution y |
Source code in ceruleo/transformation/features/extraction_frequency.py
get_moment(y, moment)
Compute the (non centered) moment of the input distribution
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y |
array
|
the discrete distribution from which one wants to calculate the moment |
required |
moment |
int
|
the moment one wants to calculate (choose 1,2,3, ... ) |
required |
Returns:
Type | Description |
---|---|
float32
|
The moment requested |
Source code in ceruleo/transformation/features/extraction_frequency.py
get_skew(y)
Calculates the skew as the third standardized moment. (Ref: https://en.wikipedia.org/wiki/Skewness#Definition)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y |
array
|
the discrete distribution from which one wants to calculate the skew |
required |
Returns:
Type | Description |
---|---|
float32
|
The skew of distribution y |
Source code in ceruleo/transformation/features/extraction_frequency.py
get_variance(y)
Compute the variance of the input distribution (aka distribution second central moment)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y |
array
|
the discrete distribution from which one wants to calculate the variance |
required |
Returns:
Type | Description |
---|---|
float32
|
The variance of distribution y |