private void InitializeFirstLayer() { //Put first sample into the nodes of the first layer (X1,X2,X3,X4 into 1st Layer Nodes) for (int i = 0; i < nodesPerLayer[0]; i++) { List<double> temp = new List<double>(); for (int j = 0; j < list_of_features.Count; j++) { temp.Add(list_of_features[j][0]); } Neuron t = new Neuron(); t.setInputs(temp); hiddenlayers[0].Add(t); } //Initialize weights of the nodes of the first layer to 0 List<double> tempWeights = new List<double>(); for (int i = 0; i < list_of_features.Count; i++) { tempWeights.Add(0); } for (int i = 0; i < nodesPerLayer[0]; i++) { hiddenlayers[0][i].setWeights(tempWeights); } }