for cross validation of SVM on mac