public RBFNetwork(IDistanceCalculator distance, IGaussianFunction gaussian, IWidthCalculator widthCalculator, INeuronPositioner positioner, int radialNeuronCount, int linearNeuronCount, int inputDimensions) { _distance = distance; _gaussian = gaussian; _widthCalculator = widthCalculator; _neuronPositioner = positioner; RadialLayer = new List <RadialNeuron>(); for (int i = 0; i < radialNeuronCount; i++) { RadialLayer.Add(new RadialNeuron(inputDimensions)); } LinearLayer = new List <LinearNeuron>(); for (int i = 0; i < linearNeuronCount; i++) { LinearLayer.Add(new LinearNeuron()); } MeanSquaredErrors = new List <double>(); TestMeanSquaredErrors = new List <double>(); }
private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { var selectedName = ((ComboBoxItem)TaskCombo.SelectedItem).Content; switch (selectedName) { case "Approximation": taskSelected = TaskSelection.APPROX; TrainingSetPath.Text = "approximation1.txt"; TestingSetPath = "approximation_test.txt"; chosenPositioner = new RandomNeuronPositioner(); break; case "Classification": taskSelected = TaskSelection.CLASS; TrainingSetPath.Text = "classification.txt"; TestingSetPath = "classification_test.txt"; chosenPositioner = new KMeansNeuronPositioner(); break; } }