Skip to content

Instantly share code, notes, and snippets.

@mdfarragher
Created November 8, 2019 15:31
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/45400f585d56575e4f302f8ee9e5d0ee to your computer and use it in GitHub Desktop.
Save mdfarragher/45400f585d56575e4f302f8ee9e5d0ee 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,
name = "training",
mode = "lines+markers"
},
new Graph.Scatter()
{
x = Enumerable.Range(0, maxEpochs).ToArray(),
y = testingError,
name = "testing",
mode = "lines+markers"
}
}
);
chart.WithXTitle("Epoch");
chart.WithYTitle("Classification error");
chart.WithTitle("Spam Detection");
// 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