Skip to content

passarel/stl-java

 
 

Repository files navigation

stl-java

travis-ci-status

A Java implementation of STL: A Seasonal-Trend Decomposition Procedure Based on Loess

To include this library in your project, add the following dependency

<dependency>
  <groupId>com.github.brandtg</groupId>
  <artifactId>stl-java</artifactId>
  <version>0.1.1</version>
</dependency>

Example

Assuming we have a time series of monthly data that is periodic with respect to years

double[] ts;
double[] ys; // ys.length == ts.length

We can run STL as follows

StlResult stl = new StlDecomposition(12 /* months in a year */).decompose(ts, ys);

And optionally plot the results (n.b. StlPlotter is in test scope)

StlPlotter.plotOnScreen(stl, "Seasonal Decomposition");

STL result chart

About

A Java implementation of STL

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 97.3%
  • Shell 2.7%