A simple tool for training perceptron-based models