Siphoned off training data and coded up matrix normalization.