pywddff.coefs
Module Contents
Functions
|
Maximal Overlap Discrete Wavelet Transform (MODWT) scaling coefficients. |
|
Maximal Overlap Discrete Wavelet Transform (MODWT) wavelet coefficients. |
|
Compute the number of boundary influenced MODWT/A Trous DWT wavelet/scaling coefficients. |
|
Helper function for multi_stationary_dwt to make column names in the |
Helper function for multi_stationary_dwt to make column names. |
|
|
Helper function for multi_stationary_dwt to make column names. |
- pywddff.coefs.scaling_coefs(x, filter, j, remove_bc=True, **kwargs)[source]
Maximal Overlap Discrete Wavelet Transform (MODWT) scaling coefficients.
- Parameters:
x (np.ndarray) – A 1D numpy array.
filter (str) – A string indicating the desired filter. There are 128 options, see the README on this package’s github page to see the list of filters available.
j (int) – Decomposition level.
remove_bc (bool) – Whether boundary coefficients should be removed. If True, boundary coefficients are removed. If False, boundary coefficients are not removed.
**kwargs – Used to specify max_L, max_J for cutting off boundary coefficients.
max_L (int) – It is unlikely that this argument will be needed by most users. This argument is used only when remove_bc = True. When max_L = None (and remove_bc = True), max_L is set equal to the length of the chosen filter, L. When removing boundary coefficients, in the case that a user wants to use a max_L in ((2^max_J)-1)*(max_L - 1) that does not equal L, the user can specify a value for max_L that is greater than L. Doing this is useful when doing comparison studies to compare different filter and decomposition level (J) combinations while controlling for the number boundary coefficients that are removed across the different configurations.
max_J (int) – It is unlikely that this argument will be needed by most users. This argument is used only when remove_bc = True. When max_J = None (and remove_bc = True), max_J is set equal to J. When removing boundary coefficients, in the case that a user wants to use a max_J in ((2^max_J)-1)*(max_L - 1) that does not equal J, the user can specify a value for max_J that is greater than J. Doing this is useful when doing comparison studies to compare different filter and decomposition level (J) combinations while controlling for the number boundary coefficients that are removed across the different configurations.
- Returns:
A 1D numpy array.
- Return type:
np.ndarray
- pywddff.coefs.wavelet_coefs(x, filter, j, remove_bc=True, **kwargs)[source]
Maximal Overlap Discrete Wavelet Transform (MODWT) wavelet coefficients.
- Parameters:
x (np.ndarray) – A 1D numpy array.
filter (str) – A string indicating the desired filter. There are 128 options, see the README on this package’s github page to see the list of filters available.
j (int) – Decomposition level.
remove_bc (bool) – Whether boundary coefficients should be removed. If True, boundary coefficients are removed. If False, boundary coefficients are not removed.
**kwargs – Used to specify max_L, max_J for cutting off boundary coefficients.
max_L (int) – It is unlikely that this argument will be needed by most users. This argument is used only when remove_bc = True. When max_L = None (and remove_bc = True), max_L is set equal to the length of the chosen filter, L. When removing boundary coefficients, in the case that a user wants to use a max_L in ((2^max_J)-1)*(max_L - 1) that does not equal L, the user can specify a value for max_L that is greater than L. Doing this is useful when doing comparison studies to compare different filter and decomposition level (J) combinations while controlling for the number boundary coefficients that are removed across the different configurations.
max_J (int) – It is unlikely that this argument will be needed by most users. This argument is used only when remove_bc = True. When max_J = None (and remove_bc = True), max_J is set equal to J. When removing boundary coefficients, in the case that a user wants to use a max_J in ((2^max_J)-1)*(max_L - 1) that does not equal J, the user can specify a value for max_J that is greater than J. Doing this is useful when doing comparison studies to compare different filter and decomposition level (J) combinations while controlling for the number boundary coefficients that are removed across the different configurations.
- Returns:
A 1D numpy array.
- Return type:
np.ndarray
- pywddff.coefs.n_boundary_coefs(filter, j, max_L=None, max_J=None)[source]
Compute the number of boundary influenced MODWT/A Trous DWT wavelet/scaling coefficients. This value is one less than the length of the equivalent wavelet/scaling filter for level j. Note that the length of the equivalent wavelet/scaling filter for level j is (2^j - 1)*(L - 1) + 1. The number of boundary influenced wavelet/scaling coefficients is obtained from the fact that we circularly convolve the equivalent wavelet/scaling filter for level j about a time series x, which means that we require the last (2^j - 1)*(L - 1) values from the time series x to compute the first (2^j - 1)*(L - 1) wavelet/scaling coefficients. L is the length of the level 1 wavelet/scaling filter.
- Parameters:
filter (str) – A string indicating the desired filter. There are 128 options, see the README on this package’s github page to see the list of filters available.
j (int) – Decomposition level.
max_L (int) – It is unlikely that this argument will be needed by most users. When max_L = None, max_L is set equal to the length of the chosen filter, L. When removing boundary coefficients, in the case that a user wants to use a max_L in ((2^max_J)-1)*(max_L - 1) that does not equal L, the user can specify a value for max_L that is greater than L. Doing this is useful when doing comparison studies to compare different filter and decomposition level (J) combinations while controlling for the number boundary coefficients that are removed across the different configurations.
max_J (int) – It is unlikely that this argument will be needed by most users. When max_J = None, max_J is set equal to J. When removing boundary coefficients, in the case that a user wants to use a max_J in ((2^max_J)-1)*(max_L - 1) that does not equal J, the user can specify a value for max_J that is greater than J. Doing this is useful when doing comparison studies to compare different filter and decomposition level (J) combinations while controlling for the number boundary coefficients that are removed across the different configurations.
- Returns:
Number of boundary coefficients to be removed.
- Return type:
int
- pywddff.coefs.make_output_names(n_inputs, j)[source]
Helper function for multi_stationary_dwt to make column names in the case that pandas_output = True.
- Parameters:
n_inputs (int) – Number of input features in original input feature set.
j (int) – Decomposition level.
- Returns:
A list containing column names for the post wavelet transform coefficients matrix. It is a list of strings.
- Return type:
list
- pywddff.coefs.make_output_names_from_df(X, j)[source]
Helper function for multi_stationary_dwt to make column names.
- Parameters:
X (pd.DataFrame) – Original input feature set.
j (int) – Decomposition level.
- Returns:
A list containing column names for the post wavelet transform coefficients matrix. It is a list of strings.
- Return type:
list
- pywddff.coefs.make_output_names_from_list(orig_input_names, j)[source]
Helper function for multi_stationary_dwt to make column names.
- Parameters:
orig_input_names (list) – Original input feature set.
j (int) – Decomposition level.
- Returns:
A list containing column names for the post wavelet transform coefficients matrix. It is a list of strings.
- Return type:
list