Added predict mode. Fixed bug in using correct classifier type for training.