Created
January 5, 2018 17:32
-
-
Save nexosisops/c2c2890f61fa6676e3b9b2957a4b6a48 to your computer and use it in GitHub Desktop.
Nexosis Scala Client Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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