Added testing code. Currently testing is done
using the trainingData itself.