private void trainButton_Click(object sender, RoutedEventArgs e) { batchSize = batchsizeTextBox.Text; steps = stepsTextBox.Text; // Construct hidden layers for (int i = 1; i < layerCreatorListBox.Items.Count - 1; i++) { hiddenLayers += $"{layerCreatorListBox.Items[i].ToString().Split(' ')[0]} "; } Console.WriteLine(hiddenLayers); if (frameworkComboBox.SelectedIndex == 0) { // Tensorflow PythonService python = new PythonService(); string args = $"{datasetFullPath} {featureCount} {classCount + 1} {batchSize} {steps} -l {hiddenLayers}"; python.RunCommand(TENSORFLOWTRAINING, args); testrunResultsTextBlock.Text = "Neural Network Trained!"; trainButton.IsEnabled = false; untrainButton.IsEnabled = true; // Run bokeh plots } else if (frameworkComboBox.SelectedIndex == 1) { // SKlearn } }
private void runtestButton_Click(object sender, RoutedEventArgs e) { testsetPercentage = datasetPercentageTextBox.Text; // Tensorflow PythonService python = new PythonService(); string args = $"{datasetFullPath} {testsetPercentage} {featureCount} {classCount + 1} -l {hiddenLayers}"; python.RunCommand(TENSORFLOWTESTING, args); testrunResultsTextBlock.Text = $"Accuracy: {python.LastResult}"; }
private void LoadBokehPlot(string datasetPath) { string feature1 = horizonalAxisComboBox.SelectedValue.ToString(); string feature2 = verticalAxisComboBox.SelectedValue.ToString(); PythonService python = new PythonService(); string args = $"{datasetPath} {feature1} {feature2}"; python.RunCommand(BOKEHPLOTTING, args); if (firstWebpageload == false) { bokehHTMLBrowser.Source = new Uri(@"http://localhost/blahblah.html"); firstWebpageload = true; } else { bokehHTMLBrowser.Reload(true); } }