A simple testing function in R for ML classifiers