forecast-api-client


License

License

MIT
Categories

Categories

Reporting Business Logic Libraries CLI User Interface
GroupId

GroupId

com.aol.one.reporting
ArtifactId

ArtifactId

forecast-api-client_2.11
Last Version

Last Version

3.1.9
Release Date

Release Date

Type

Type

jar
Description

Description

forecast-api-client
forecast-api-client
Project URL

Project URL

https://github.com/vidible/aol-on-forecast
Project Organization

Project Organization

com.aol.one.reporting
Source Code Management

Source Code Management

https://github.com/vidible/aol-on-forecast

Download forecast-api-client_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/com.aol.one.reporting/forecast-api-client_2.11/ -->
<dependency>
    <groupId>com.aol.one.reporting</groupId>
    <artifactId>forecast-api-client_2.11</artifactId>
    <version>3.1.9</version>
</dependency>
// https://jarcasting.com/artifacts/com.aol.one.reporting/forecast-api-client_2.11/
implementation 'com.aol.one.reporting:forecast-api-client_2.11:3.1.9'
// https://jarcasting.com/artifacts/com.aol.one.reporting/forecast-api-client_2.11/
implementation ("com.aol.one.reporting:forecast-api-client_2.11:3.1.9")
'com.aol.one.reporting:forecast-api-client_2.11:jar:3.1.9'
<dependency org="com.aol.one.reporting" name="forecast-api-client_2.11" rev="3.1.9">
  <artifact name="forecast-api-client_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.aol.one.reporting', module='forecast-api-client_2.11', version='3.1.9')
)
libraryDependencies += "com.aol.one.reporting" % "forecast-api-client_2.11" % "3.1.9"
[com.aol.one.reporting/forecast-api-client_2.11 "3.1.9"]

Dependencies

compile (5)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.8
com.fasterxml.jackson.core : jackson-databind jar 2.3.5
org.scalaj : scalaj-http_2.11 jar 2.3.0
org.slf4j : slf4j-api jar 1.7.10
com.typesafe : config jar 1.3.0

test (3)

Group / Artifact Type Version
org.scalatest : scalatest_2.11 jar 3.0.1
org.powermock : powermock-api-mockito jar 1.6.4
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

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

Versions

Version
3.1.9
3.1.8
3.1.7
3.1.6
3.1.5
3.1.4
3.1.3
3.1.1
3.1.0
3.0.0