Learning the XOR function
Success in 791 training rounds!
Result
Testset 0; expected output = (-1) output from neural network = (-0.9893255794242)
Testset 1; expected output = (1) output from neural network = (0.99038762473996)
Testset 2; expected output = (1) output from neural network = (0.9899380463192)
Testset 3; expected output = (-1) output from neural network = (-0.99056132497656)
Playing around...
The following is to show how changing the momentum & learning rate,
in combination with the number of rounds and the maximum allowable error, can
lead to wildly differing results. To obtain the best results for your
situation, play around with these numbers until you find the one that works
best for you.
The values displayed here are chosen randomly, so you can reload
the page to see another set of values...
Learning rate 0.1, momentum 0.8 @ (100 rounds, max sq. error 0.001)
Round 1: No success...
Round 2: No success...
Learning rate 0.1, momentum 1 @ (1000 rounds, max sq. error 0.1)
Success in 149 training rounds!
Testset 0; expected output = (-1) output from neural network = (-0.91135240676606)
Testset 1; expected output = (1) output from neural network = (0.92402155349206)
Testset 2; expected output = (1) output from neural network = (0.95337522036739)
Testset 3; expected output = (-1) output from neural network = (-0.84878184307889)
Learning rate 0.1, momentum 1 @ (100 rounds, max sq. error 0.01)
Round 1: No success...
Round 2: No success...
Learning rate 1, momentum 0.4 @ (500 rounds, max sq. error 0.05)
Round 1: No success...
Round 2: No success...
Learning rate 1, momentum 0.6 @ (1000 rounds, max sq. error 0.1)
Round 1: No success...
Round 2: No success...
Learning rate 1, momentum 0.8 @ (500 rounds, max sq. error 0.05)
Round 1: No success...
Round 2: No success...
Learning rate 0.5, momentum 0.2 @ (1000 rounds, max sq. error 0.1)
Round 1: No success...
Success in 27 training rounds!
Testset 0; expected output = (-1) output from neural network = (-0.97729554417667)
Testset 1; expected output = (1) output from neural network = (0.92763609185871)
Testset 2; expected output = (1) output from neural network = (0.91874668841717)
Testset 3; expected output = (-1) output from neural network = (-0.87726080332316)
Learning rate 1, momentum 0.2 @ (1000 rounds, max sq. error 0.05)
Round 1: No success...
Round 2: No success...
Learning rate 0.25, momentum 0.8 @ (2000 rounds, max sq. error 0.1)
Success in 54 training rounds!
Testset 0; expected output = (-1) output from neural network = (-0.89192683391049)
Testset 1; expected output = (1) output from neural network = (0.89658363568)
Testset 2; expected output = (1) output from neural network = (0.93458797544372)
Testset 3; expected output = (-1) output from neural network = (-0.88890402644691)
Learning rate 0.25, momentum 0.2 @ (500 rounds, max sq. error 0.001)
Round 1: No success...
Round 2: No success...