public void Start(int?noOfSubsets = null, int?testingSubsetIndex = null) { var inputVariables = GetNeuralNetworkInputVariables(_testingModel.NeuralNetworkPath); _excelService = new ExcelService(_testingModel.DataFilePath, _testingModel.Sheet, _testingModel.IdColumn, inputVariables, _testingModel.OutputVariables); _worker = new BackgroundWorker(); _worker.DoWork += worker_DoWork; if (_progressChangedEventHandler != null) { _worker.ProgressChanged += _progressChangedEventHandler; } _worker.WorkerReportsProgress = true; _worker.WorkerSupportsCancellation = true; _worker.RunWorkerCompleted += worker_RunWorkerCompleted; var workerInfo = new WorkerInfo { NoOfSubsets = noOfSubsets, TestingSubsetIndex = testingSubsetIndex, TestingRows = GetTestingRows(noOfSubsets, testingSubsetIndex) }; _worker.RunWorkerAsync(workerInfo); }
public void Start(int?noOfSubsets = null, int?testingSubsetIndex = null) { _excelService = new ExcelService(_trainingModel.TrainingData.FilePath, _trainingModel.TrainingData.Sheet, _trainingModel.TrainingData.IdColumn, _trainingModel.TrainingData.InputVariables, _trainingModel.TrainingData.OutputVariables); _worker = new BackgroundWorker(); _worker.DoWork += worker_DoWork; if (_progressChangedEventHandler != null) { _worker.ProgressChanged += _progressChangedEventHandler; } _worker.WorkerReportsProgress = true; _worker.WorkerSupportsCancellation = true; _worker.RunWorkerCompleted += worker_RunWorkerCompleted; var workerInfo = new WorkerInfo { LearningRate = _trainingModel.LearningRate, Epochs = _trainingModel.NoOfEpochs, Error = _trainingModel.MinError, TrainingRows = GetTrainingRows(noOfSubsets, testingSubsetIndex), NoOfSubsets = noOfSubsets, TestingSubsetIndex = testingSubsetIndex }; _worker.RunWorkerAsync(workerInfo); }