Skip to content

Instantly share code, notes, and snippets.

@mdfarragher
Created December 3, 2019 13:29
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 mdfarragher/628985a3e98c70c8cd36988f7474b504 to your computer and use it in GitHub Desktop.
Save mdfarragher/628985a3e98c70c8cd36988f7474b504 to your computer and use it in GitHub Desktop.
// plot the error graph
var chart = Chart.Plot(
new []
{
new Graph.Scatter()
{
x = Enumerable.Range(0, maxEpochs).ToArray(),
y = trainingError.Select(v => 1 - v),
name = "training",
mode = "lines+markers"
},
new Graph.Scatter()
{
x = Enumerable.Range(0, maxEpochs).ToArray(),
y = testingError.Select(v => 1 - v),
name = "testing",
mode = "lines+markers"
}
}
);
chart.WithOptions(new Layout.Layout()
{
yaxis = new Graph.Yaxis()
{
rangemode = "tozero"
}
});
chart.WithXTitle("Epoch");
chart.WithYTitle("Accuracy");
chart.WithTitle("Movie Review Sentiment");
// save chart
File.WriteAllText("chart.html", chart.GetHtml());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment