Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

wavelet transform in machine learning

import pywt
import matplotlib.pyplot as plt
 
db_wavelets = pywt.wavelist('db')[:5]
print(db_wavelets)
*** ['db1', 'db2', 'db3', 'db4', 'db5']
 
fig, axarr = plt.subplots(ncols=5, nrows=5, figsize=(20,16))
fig.suptitle('Daubechies family of wavelets', fontsize=16)
for col_no, waveletname in enumerate(db_wavelets):
    wavelet = pywt.Wavelet(waveletname)
    no_moments = wavelet.vanishing_moments_psi
    family_name = wavelet.family_name
    for row_no, level in enumerate(range(1,6)):
        wavelet_function, scaling_function, x_values = wavelet.wavefun(level = level)
        axarr[row_no, col_no].set_title("{} - level {}
{} vanishing moments
{} samples".format(
            waveletname, level, no_moments, len(x_values)), loc='left')
        axarr[row_no, col_no].plot(x_values, wavelet_function, 'bD--')
        axarr[row_no, col_no].set_yticks([])
        axarr[row_no, col_no].set_yticklabels([])
plt.tight_layout()
plt.subplots_adjust(top=0.9)
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: converting multipage tiff to pdf python 
Python :: random module 
Python :: planet earth minecraft 
Python :: manifest.in python 
Python :: add border to table in python pptx 
Python :: what does waka waka mean 
Python :: proxy pool for scrapy 
Python :: load text file line in listbox python tkinter site:stackoverflow.com 
Python :: iniciar un projecto de python con pyenv 
Python :: file = Root() path = file.fileDialog() print("PATH = ", path) 
Python :: python char to hex 
Python :: mad libs game prompt python 
Python :: gcp functions save BQ 
Shell :: remove postgresql ubuntu 
Shell :: restart apache ubuntu 
Shell :: pip upgrade 
Shell :: dotnet ef scaffold sqlite 
Shell :: Remove composer for ubuntu 
Shell :: install framer motion 
Shell :: flask_wtf install 
Shell :: git pull with submodules 
Shell :: increase no of watchers 
Shell :: android gradle signing report 
Shell :: install chai 
Shell :: yarn install 
Shell :: Unmet dependencies. 
Shell :: install docker compose homebrew 
Shell :: remove stopped containers 
Shell :: .ps1 is not digitally signed. You cannot run this script on the current system. 
Shell :: npm reinstall 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =