An example of handling live radio spectrum data to run into a constantly running ML model (retrains every two seconds). Was used to demonstrate the optimizations of Intel’s Scikit-learn accelerator called daal4py as well as some of their NumPy and SciPy optimizations.
The idea came from my hobby of Amateur Radio (Ham radio) where I have to sift through lots of signal data to determine the morse signals that are available. This is a precursor project to the framework I’m building to help connect some of those workflows in the Ham radio world to the Python community.
Built as a Bokeh server application, with periodic callbacks handling the 1) spectrum data generation or live data 2) Scikit-learn calls to train with the new data available and 3) Look for changes to the interactive slider UI which changes the moving window or memory size of the radio data to put into scikit-learn.
Sliders to change model parameters. For now it is only the window size (array size/memory) that works.
It should also be noted that all the calls for ML and signal processing are blocking, so increasing the training size can slow down the demo dramatically. I’m trying to find a good way to make it non-blocking but it will take some time to figure out how it can be done cleanly.