changes to run_perceptron to try to avoid error with mis-sized X and Y