Last active
January 8, 2018 15:36
-
-
Save nexosisops/5e1464cf9d115deb58f2619f6ada971c to your computer and use it in GitHub Desktop.
Nexosis C# 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
// Create client | |
var client = new NexosisClient(); | |
// Submit dataset | |
client.DataSets.Create("widget-sales", DataSet.From(File.OpenText("C:\\path\\to\\sales-file.csv"))); | |
// Creating a forecast session | |
var sessionResponse = client.Sessions.CreateForecast( | |
Sessions.Forecast( | |
"widget-sales", | |
DateTimeOffset.Parse("2017-12-12 10:11:12 -0:00"), | |
DateTimeOffset.Parse("2017-12-22 22:23:24 -0:00"), | |
ResultInterval.Day, | |
"daily_transaction") | |
); | |
// Retrieve forecast results | |
var results = await client.Sessions.GetResults(sessionResponse.SavedSessionId); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment