STL

But how does one calculate a seasonal cycle? In this section, we'll be using an algorithm invented in the late 1980s called Seasonal and Trend Decomposition (STL) by LOESS by Cleveland et al. I wrote a library that implements that. You can install it by running go get -u github.com/chewxy/stl.

The library is really small—there is only one main function to call (stl.Dcompose), and the library comes with a litany of features to aid with decomposition of data.

Despite that, I think it would be a good idea to have a rough understanding of the STL algorithm before using it, as usage requires knowledge.

Get Go Machine Learning Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.