Skip to content

Instantly share code, notes, and snippets.

@nexosisops
Last active January 8, 2018 15:36
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/5e1464cf9d115deb58f2619f6ada971c to your computer and use it in GitHub Desktop.
Save nexosisops/5e1464cf9d115deb58f2619f6ada971c to your computer and use it in GitHub Desktop.
Nexosis C# Client Sample
// 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