Prediction with SpectrogramsHi All, With strong inspiration from prior work by Bill, Pete, and Emmanuel, I've just put together a new script for creating spectrogram images. Spectrograms are heatmaps computed via Fast Fourier Transform (FFT) on sliding windows across a series of spectra.
The primary idea is to use these images as inputs in Torch to predict properties of the spectra. This appears to be a good complement / addition to spectral FDE workflows and is easy to set up.
A first example from the NMR alcohol data is attached--big thanks to Emmanuel for the full data, extracted from his excellent journal. It works! Example output:


Also attached is an initial JSL script for computing spectrograms.
Feedback welcome.
Smiling,
Russ
P.S. Planning to convene a "Machine Learning for Chemistry" interest group at Reunion next week--please attend if you are able.
Re: Prediction with Spectrograms@russ_wolfinger - Love this for large collections of spectra. It would be great to have the FFT as transform column option for single spectra (or small groups) as well. The capability is really useful in the x-ray crystallography space: Fast Fourier transform and multi-Gaussian fitting of XRR data to determine the thickness of ALD grown thin films within the initial growth regime (pdf available here.)
Re: Prediction with SpectrogramsHi Russ,
great work as always - Thanks!
I tested the script and it works nice, except the fact when using the "page" function in GB it seems to limit my display to only 200. This results in only 200 out of 219 spectrograms to be brought back into the original table.
It works fine by using :g as the "wrap" variable.

Not sure if this is a local setting for me only.
Best
Florian
Re: Prediction with SpectrogramsYes @Florian_Vogt , thanks for mentioning--I encountered this also. To remedy: File > Preferences > Graph Builder and increase Page Limit from 200 to some number >= the number of spectra.
Re: Prediction with SpectrogramsThanks @russ_wolfinger !
For those interested I have a slightly updated the version which uses the "wrap" variable and saves a script to the main table for the data table and gb to investigate individual spectrograms.