def __init__(self,input_num=2,function_name='hardlim',weight=None,bias=None,data_set=None,learning_rate=0.2,max_error=0,max_epoch=-1):
     
     TwoLayersNeuralNetwork.__init__(self, input_num, input_num, function_name, weight, bias, data_set,learning_rate,max_error,max_epoch)
     
     for i in range(len(self.net.layer_to_layer_weight['in_to_out'])):
         self.net.layer_to_layer_weight['in_to_out'][i][i]=0
     for i in range(len(self.net.layer_to_layer_weight['in_to_out'])):
         for j in range(len(self.net.layer_to_layer_weight['in_to_out'][0])):
             self.net.layer_to_layer_weight['in_to_out'][i][j]=self.net.layer_to_layer_weight['in_to_out'][j][i]
     self.net.updateNeuronToNeuronWeightByLayerToLayerWeight()
Exemple #2
0
 def __init__(
     self,
     input_num=2,
     output_num=2,
     function_name="purelin",
     weight=None,
     bias=None,
     data_set=None,
     learning_rate=0.2,
     max_error=0,
     max_epoch=-1,
 ):
     TwoLayersNeuralNetwork.__init__(
         self, input_num, output_num, function_name, weight, bias, data_set, learning_rate, max_error, max_epoch
     )
Exemple #3
0
 def showNetworkSimulation(self):
     TwoLayersNeuralNetwork.showNetworkSimulation(self)
Exemple #4
0
 def returnNeuronBuilder(self):
     return TwoLayersNeuralNetwork.returnNeuronBuilder(self)
Exemple #5
0
 def setMaxEpoch(self,max_epoch):
     TwoLayersNeuralNetwork.setMaxEpoch(self, max_epoch)
Exemple #6
0
 def setMaxError(self,max_error):
     TwoLayersNeuralNetwork.setMaxError(self, max_error)
Exemple #7
0
 def setLearningRate(self,learning_rate):
     TwoLayersNeuralNetwork.setLearningRate(self, learning_rate)
Exemple #8
0
 def plotFigure(self):
     TwoLayersNeuralNetwork.plotFigure(self)
Exemple #9
0
 def train(self):
     TwoLayersNeuralNetwork.train(self)
Exemple #10
0
 def setDataSet(self,data_set):
     TwoLayersNeuralNetwork.setDataSet(self, data_set)
Exemple #11
0
 def activate(self,input_list):
     return TwoLayersNeuralNetwork.activate(self, input_list)