Added methods for averaging weights in perceptron models.