Skip to content

Instantly share code, notes, and snippets.

@nexosisops
Created January 5, 2018 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nexosisops/c2c2890f61fa6676e3b9b2957a4b6a48 to your computer and use it in GitHub Desktop.
Save nexosisops/c2c2890f61fa6676e3b9b2957a4b6a48 to your computer and use it in GitHub Desktop.
Nexosis Scala Client Sample
// Submit dataset
val client = new NexosisClient()
client.getDataSets.create("widget-sales", new FileInputStream("./sales-file.csv"))
// Creating a forecast session
val session = client.getSessions.createForecast(
"widget-sales",
"daily_transaction",
DateTime.parse("2017-12-12T0:00:00Z"),
DateTime.parse("2017-12-22T0:00:00Z"),
ResultInterval.DAY
)
// Retrieve forecast results
val status = client.getSessions.getResults(session.getSessionId,
new FileOutputStream("./results-file.csv"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment