Added code to choose optimal C and sigma parameters