Unix shell script to train, test and generate confusion matrix