Linear perceptron training home assignment
perceptron.py: generic perceptron training algorithm
bcwd.py: BCWD data set related routines
main.py:
- downloads the BCWD dataset
- splits into training and test set (using the given fraction, 0.10 currently)
- runs given number of perceptron training algorithm
- calculates the error rate, precision and recall
- averages error rate over the given number of iteration and prints it out
Current error rate averaged over 100 runs is about 11 %.
You need python3
and numpy
to run the program.
Run as python3 main.py
.