Search code examples
pythonneural-networkfann

What is the format of training data in pyfann?


What is the format of thraining data in pyfann? Concretely I would like to use the init_weight function of pyfann, but it does not take a range, but finds the range from traning data. Therefore I would like to create a small fake dataset, which has the lowest and the highes value of what can be expected in the programm.


Solution

  • Frist Line, 3 arguments: number of data to train, number of inputs, number of outputs from there, goes one line of inputs and one of outputs e.g. (AND logic matrix):

    4 2 1    
    1 1    
    1    
    0 1    
    0    
    0 0    
    0    
    1 0    
    0  
    

    Above:

    • 4 datas to train:

      1 AND 1 = 1
      0 AND 1 = 0
      0 AND 0 = 0
      1 AND 0 = 0

    • 2 inputs

    • 1 output