'center and optionally standardize the data using the mean and sigma
from training set a'

def center(self, x):

    if self.standardize:
        return ((x - self.mu) / self.sigma)
    else:
        return (x - self.mu)
