Probablemente lo mejor que puede hacer es diseñar una red neuronal que aprenda la función XOR. Aquí hay un sitio web que muestra ejecuciones de muestra: http://www.generation5.org/content/2001/xornet.asp
Tenía una tarea en la que nuestro maestro nos dio las primeras carreras de la red neuronal con pesos determinados ... si configura su red neuronal con los mismos pesos, entonces deberías obtener los mismos resultados (con retropropagación directa).
Si tienes una red neuronal con 1 capa de entrada (con 2 neuronas de entrada + 1 constante), 1 capa oculta (con 2 neuronas + 1 constante) y 1 capa de salida e inicializas todas tus pesas a 0.6, y haces sus neuronas constantes siempre devuelven -1, entonces usted debe conseguir los mismos resultados en sus primeras 10 carreras:
* Data File: xor.csv
* Number of examples: 4
Number of input units: 2
Number of hidden units: 2
Maximum Epochs: 10
Learning Rate: 0.100000
Error Margin: 0.100000
==== Initial Weights ====
Input (3) --> Hidden (3) :
1 2
0 0.600000 0.600000
1 0.600000 0.600000
2 0.600000 0.600000
Hidden (3) --> Output:
0 0.600000
1 0.600000
2 0.600000
***** Epoch 1 *****
Maximum RMSE: 0.5435466682137927
Average RMSE: 0.4999991292217466
Percent Correct: 0%
Input (3) --> Hidden (3) :
1 2
0 0.599691 0.599691
1 0.599987 0.599987
2 0.599985 0.599985
Hidden (3) --> Output:
0 0.599864
1 0.599712
2 0.599712
***** Epoch 2 *****
Maximum RMSE: 0.5435080531724404
Average RMSE: 0.4999982558452263
Percent Correct: 0%
Input (3) --> Hidden (3) :
1 2
0 0.599382 0.599382
1 0.599973 0.599973
2 0.599970 0.599970
Hidden (3) --> Output:
0 0.599726
1 0.599425
2 0.599425
***** Epoch 3 *****
Maximum RMSE: 0.5434701135827593
Average RMSE: 0.4999973799942081
Percent Correct: 0%
Input (3) --> Hidden (3) :
1 2
0 0.599072 0.599072
1 0.599960 0.599960
2 0.599956 0.599956
Hidden (3) --> Output:
0 0.599587
1 0.599139
2 0.599139
***** Epoch 4 *****
Maximum RMSE: 0.5434328258833577
Average RMSE: 0.49999650178769495
Percent Correct: 0%
Input (3) --> Hidden (3) :
1 2
0 0.598763 0.598763
1 0.599948 0.599948
2 0.599941 0.599941
Hidden (3) --> Output:
0 0.599446
1 0.598854
2 0.598854
***** Epoch 5 *****
Maximum RMSE: 0.5433961673713259
Average RMSE: 0.49999562134010495
Percent Correct: 0%
Input (3) --> Hidden (3) :
1 2
0 0.598454 0.598454
1 0.599936 0.599936
2 0.599927 0.599927
Hidden (3) --> Output:
0 0.599304
1 0.598570
2 0.598570
***** Epoch 6 *****
Maximum RMSE: 0.5433601161709642
Average RMSE: 0.49999473876144657
Percent Correct: 0%
Input (3) --> Hidden (3) :
1 2
0 0.598144 0.598144
1 0.599924 0.599924
2 0.599914 0.599914
Hidden (3) --> Output:
0 0.599161
1 0.598287
2 0.598287
***** Epoch 7 *****
Maximum RMSE: 0.5433246512036478
Average RMSE: 0.49999385415748615
Percent Correct: 0%
Input (3) --> Hidden (3) :
1 2
0 0.597835 0.597835
1 0.599912 0.599912
2 0.599900 0.599900
Hidden (3) --> Output:
0 0.599017
1 0.598005
2 0.598005
***** Epoch 8 *****
Maximum RMSE: 0.5432897521587884
Average RMSE: 0.49999296762990975
Percent Correct: 0%
Input (3) --> Hidden (3) :
1 2
0 0.597526 0.597526
1 0.599901 0.599901
2 0.599887 0.599887
Hidden (3) --> Output:
0 0.598872
1 0.597723
2 0.597723
***** Epoch 9 *****
Maximum RMSE: 0.5432553994658493
Average RMSE: 0.49999207927647754
Percent Correct: 0%
Input (3) --> Hidden (3) :
1 2
0 0.597216 0.597216
1 0.599889 0.599889
2 0.599874 0.599874
Hidden (3) --> Output:
0 0.598726
1 0.597443
2 0.597443
***** Epoch 10 *****
Maximum RMSE: 0.5432215742673802
Average RMSE: 0.4999911891911738
Percent Correct: 0%
Input (3) --> Hidden (3) :
1 2
0 0.596907 0.596907
1 0.599879 0.599879
2 0.599862 0.599862
Hidden (3) --> Output:
0 0.598579
1 0.597163
2 0.597163
Input (3) --> Hidden (3) :
1 2
0 0.596907 0.596907
1 0.599879 0.599879
2 0.599862 0.599862
Hidden (3) --> Output:
0 0.598579
1 0.597163
2 0.597163
xor.csv contiene los siguientes datos:
0.000000,0.000000,0
0.000000,1.000000,1
1.000000,0.000000,1
1.000000,1.000000,0
Su red neuronal debe ser similar esto (sin tener en cuenta los pesos, el amarillo es la neurona de entrada constante): alt text http://tcl.jtang.org/ffbp/ffbp-xor.png