GithubHelp home page GithubHelp logo

justm0rph3u5 / aol-on-forecast Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yahoo/aol-on-forecast

0.0 1.0 0.0 2.88 MB

A REST service for making time-series forecasting. Comes with a java client.

License: Apache License 2.0

Shell 0.03% JavaScript 37.95% Python 0.65% Java 53.70% Scala 2.45% CSS 4.60% HTML 0.56% Dockerfile 0.07%

aol-on-forecast's Introduction

Build Status

Forecast API

Forecast API is a REST service for making time-series forecasting. It is suitable for making forecasts that exhibit daily, weekly and yearly seasonalities. Trends through time can also be detected. For example you can use it to forecast number of webpage views for the coming week given data for the past month.

Quickstart

Run the forecast-api docker image and make a rest call to get forecasts

docker run --name forecast-api -p=9072:8080 vidible/forecast-api:2.0.3
curl -X POST -H "Content-Type: application/json" -d '{ "timeSeries": [ 0, 1, 2, 3, 2, 1, 0, 0, 1, 2, 3, 2, 1, 0, 0 ], "numberForecasts": 7 }' "http://localhost:9072/forecast-api/forecast"

Expected response

{
  "forecast" : [ 1.0, 2.0, 3.0, 2.0, 1.0, 0.0, 0.0 ],
  "selectedCannedSet" : "RW-NONE-WEEK",
  "time" : 68
}

Example scenarios

Here are some forecast scenarios. Solid line shows historical data and dotted lines are forecasts.

Java client

Forecast-API comes with a java based client. It should be straightforward to write a simple REST client for other languages.

build.sbt
    "com.aol.one.reporting" % "forecast-api-client" % INSERT_LATEST_VERSION
pom.xml
<dependency>
  <groupId>com.aol.one.reporting</groupId>
  <artifactId>forecast-api-client_2.11</artifactId>
  <version>INSERT_LATEST_VERSION</version>
</dependency> 
Usage

Example below provides a timeseries with 14 data points and requests forecast for the next 7 data points:

val client = new ForecastClientImpl("http://localhost:9072/forecast-api/forecast")
val forecast = client.forecast(Array(1, 2, 3, 4, 3, 2, 1, 1, 2, 3, 4, 3, 2, 1), 7)

Docs

  • Forecast API makes use of a few algorithms including ARIMA, Regression and exponential smoothing. Head over to the wiki to learn more.
  • Swagger docs can be found at http://localhost:9072/forecast-api.

Build from source

Server:

cd server
mvn install

Client:

cd client
sbt compile

Contributors

  • Alexey Lipodat
  • Paul Eldreth
  • Sergey Likhoman
  • Terry Choi
  • Tilaye Y. Alemu
  • Venkata Vittala

License

Forecast API is released under the Apache License, Version 2.0

aol-on-forecast's People

Contributors

tilayealemu avatar adeolaawoyemi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.