<commit_before># Tensorflow CWT
This implements a 1-D Continuous Wavelet Transform (CWT) in tensorflow. The benefit is that it runs parallel on GPUs.

The following wavelets are available:
* Ricker wavelet - cwtRicker
* Mortlet wavelet - cwtMortlet

## Benchmarks
The benchmarks are still being organized. It was done with tensorflow on a CPU (w/o AVX extensions, etc). Of course, a fair comparison is with a GPU. This will happen soon.

Here are the results
* Using a GPU, this repo is about 8x faster than cpu only. (old laptop i5 vs GTX 750 TI ~1,400 GFLOPS). 
* This repo's CWT against Pywavelet's Haar transform (DWT) - Pywavelet is ~200,000x faster
* This repo's CWT against Pywavelet's CWT - Pywavelet is 13x faster

The last two are both with tensorflow CPUs of course. And DWT is always faster, so this is unsurprising.

### Relavent data. This can be aquired by running `python benchmark.py`

* DWT - sampleSize = 10000000
    * pywavelet dwt haar: 0.06824707984924316
    * pywavelet dwt db2: 0.08141493797302246
    * pywavelet dwt db8: 0.14669179916381836

* CWT - sampleSize = 10000; cwtWidth = 256
    * pywavelet cwt mortlet: 1.1284675598144531
    * tensorflow cwt mortlet: 14.783239364624023

## Examples<commit_msg>better readme<commit_after># Tensorflow CWT
This implements a 1-D Continuous Wavelet Transform (CWT) in tensorflow. The benefit is that it runs parallel on GPUs.

The following wavelets are available:
* Ricker wavelet - cwtRicker
* Mortlet wavelet - cwtMortlet

## Benchmarks
The benchmarks are still being organized. It was done with tensorflow on a CPU (w/o AVX extensions, etc). Of course, a fair comparison is with a GPU. This will happen soon.

Here are the results
* Using a GPU, this repo is about 8x faster than cpu only. (old laptop i5 vs GTX 750 TI ~1,400 GFLOPS). 
* This repo's CWT against Pywavelet's Haar transform (DWT) - Pywavelet is ~200,000x faster
* This repo's CWT against Pywavelet's CWT - Pywavelet is 13x faster

The last two are both with tensorflow CPUs of course. And DWT is always faster, so this is unsurprising.

### Benchmark times 
This can be aquired by running `python benchmark.py`

* DWT - sampleSize = 10000000
    * pywavelet dwt haar: 0.06824707984924316
    * pywavelet dwt db2: 0.08141493797302246
    * pywavelet dwt db8: 0.14669179916381836
* CWT - sampleSize = 10000; cwtWidth = 256
    * pywavelet cwt mortlet: 1.1284675598144531
    * tensorflow cwt mortlet: 14.783239364624023

## Examples
{'fraction_non_alphanumeric': 0.06439854191980558, 'fraction_numerical': 0.10044552450384771, 'mean_word_length': 3.98989898989899, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5662560', 'n_tokens_mistral': 982, 'n_tokens_neox': 797, 'n_words': 340}