perceptron classifier refactoring