private void btnClear_Click(object sender, EventArgs e) { txtMain.Clear(); btnAnalyze.Enabled = btnCreateNeuralNet.Enabled = btnOutputNormalized.Enabled = btnTrain.Enabled = btnSaveNetwork.Enabled = btnLoadNetwork.Enabled = btnTestNetwork.Enabled = false; btnOpen.Enabled = true; m_data = null; m_predictor = null; }
public Predictor(String fileName, TextBox txtOutput, CSVData data, double percentValidation) { m_network = (BasicNetwork)EncogDirectoryPersistence.LoadObject(new FileInfo(fileName)); m_txtOutputWindow = txtOutput; m_data = data; // Populate the input and output arrays LoadData(percentValidation); m_train = new Backpropagation(m_network, new BasicMLDataSet(m_inputTraining, m_outputTraining)); }
public Predictor(TextBox txtOutput, CSVData data, int hiddenNodes, double percentValidation) { m_txtOutputWindow = txtOutput; m_data = data; // Populate the input and output arrays LoadData(percentValidation); // Create Neural Network m_network = new BasicNetwork(); m_network.AddLayer(new BasicLayer(null, true, m_data.InputNodes)); m_network.AddLayer(new BasicLayer(new ActivationSigmoid(), true, hiddenNodes)); m_network.AddLayer(new BasicLayer(new ActivationSigmoid(), false, m_data.OutputNodes)); m_network.Structure.FinalizeStructure(); m_network.Reset(); m_train = new Backpropagation(m_network, new BasicMLDataSet(m_inputTraining, m_outputTraining)); }
private void btnOpen_Click(object sender, EventArgs e) { var open = new OpenFileDialog(); txtMain.AppendText(String.Format("Open File Result: {0}{1}",open.ShowDialog().ToString(), Environment.NewLine)); txtMain.AppendText(String.Format("File Name: {0}{1}", open.FileName, Environment.NewLine)); m_data = new CSVData(open.FileName); txtInputNodes.Text = m_data.InputNodes.ToString(); txtOutputNodes.Text = m_data.OutputNodes.ToString(); txtTotalRecords.Text = (m_data.Rows - 1).ToString(); UpdateTrainingSetSize(); btnOpen.Enabled = false; btnCreateNeuralNet.Enabled = true; btnAnalyze.Enabled = true; btnLoadNetwork.Enabled = true; }