How to solve the AttributeError: module 'pywt' has no attribute 'sure_thresh'? As well as pywt.threshold_sure

257 views Asked by At

I want to implement a wavelet threshold noise reduction method using the SureShrink method for time series data.

Code

import numpy as np
import pywt

threshold = pywt.threshold_sure(coeffs[i], np.sqrt(2 * np.log(len(data))), 'soft')`

Note: I changed the function name to pywt.threshold_sure. It didn't work.

Issue

However, when I run the demo code, an error is reported:

AttributeError: module 'pywt' has no attribute 'sure_thresh'

How to solve it?

0

There are 0 answers