I am currently carrying out a cross validation method with support vector machine classification of dicom images using the code:
#Cross Validation using k-folds
clf = svm.SVC(kernel='linear')
scores = cross_validation.cross_val_score(clf,X,Y,cv=16))
print scores
print("Accuracy: %0.2f (+/- %0.2f)" % (scores.mean(),scores.std()*2))
As you can see, I am currently using 16 folds, how would I find out the best amount of folds to use? Is it a case of more is better?
Also, I have found that whilst using cross validation, my accuracy scores vary massively from 66% to 100% which usually give a mean accuracy of 82% - 85%. Is there any advice on how I could improve this and perhaps ensure the classifier is picking equal amount of images from each class?
Sorry, I'm very new to Python!
Thank you for any advice!