What does this function do?  Can we add a docstring that describes it?  e.g.

'''
Perform one optimization step.  

Updates model with respect to training example i, j?

Modifies ``self.E`` to reflect new model.
'''