CS 4407 Programming Assign. Unit 7
CS 4407 Programming Assign. Unit 7
In Unit 6, I developed and trained a neural network to recognize numbers (0-9) and letters (A-F,
H) based on their seven-segment display patterns. This report summarizes the process, including
the number of iterations evaluated, the results obtained, and the alternatives tested to achieve the
Several iterations of network designs were evaluated to determine the optimal configuration for
accurate recognition. The primary focus was on the number of layers, neurons per layer, and
1. Initial Configuration:
Momentum: 0.8
Weight Range: -1 to 1
This initial configuration was chosen based on the complexity of the problem and the size of the
2. Refinement:
After observing the error rate after 5,000 steps, I increased the number of training steps to
20,000, then 50,000, and finally 100,000 to further reduce the error rate.
The learning rate and momentum were kept constant, as they provided a good balance
Results Obtained
1. Error Rate:
After 5,000 steps, the error rate was approximately 0.05, which was close to the
Finally, after 100,000 steps, the error rate reached 0.024, which is well below the required
threshold.
2. Testing Accuracy:
The network was tested on all 17 patterns from the pattern file.
The results showed that the network accurately recognized all patterns, with minor
deviations (e.g., 0.01 or 0.02) in some output values, which were negligible and did not
Alternatives Tested
To determine the best approach for training the network, several alternatives were tested:
of 0.3 provided the best balance between convergence speed and stability.
2. Momentum Adjustment:
Momentum values of 0.5 and 0.9 were tested, but a momentum of 0.8 was found to be
3. Weight Range:
I tested weight ranges of -0.5 to 0.5 and -2 to 2, but the range of -1 to 1 provided the best
4. Number of Neurons:
I experimented with different numbers of neurons in the hidden layer (e.g., 4, 8) but
found that 6 neurons provided the best balance between model complexity and
performance.
Conclusion
The final network configuration, with 6 neurons in the hidden layer, a learning rate of 0.3,
momentum of 0.8, and a weight range of -1 to 1, achieved an error rate of 0.024 after 100,000
training steps. This configuration provided accurate recognition of all 17 patterns in the
minimum number of training steps. The process demonstrated the importance of iterative testing
References
Cabreira, Ariel G., Martin Tripode, and Adrián Madirolas. 2009. "Artificial Neural Networks for