I applied SVM (scikit-learn) in some dataset and wanted to find the values of C and gamma that can give the best accuracy for the test set.
I first fixed C to a some integer and then iterate over many values of gamma until I got the gamma which gave me the best test set accuracy for that C. And then I fixed this gamma which i got in the above step and iterate over values of C and find a C which can give me best accuracy and so on ...
But the above steps can never give the best combination of gamma and C that produce best test set accuracy.
Can anyone help me in finding a way out to get this combo (gamma,C) in sckit-learn ?