add plot mode for training, create normalize function for local features (but need to be improved to not compress data)