grid_parameters {'kernel'['linear''rbf']'gamma'[ - - ]' '[ ]perform hyperparameter tuning print("tuning hyper-parameters for accuracy\ "clf gridsearchcv(svc(random_state= )grid_parameterscv= scoring='accuracy'clf fit(x_trainy_trainview accuracy scores for all the models print("grid scores for all the models based on cv:\ "means clf cv_results_['mean_test_score'stds clf cv_results_['std_test_score'for meanstdparams in zip(meansstdsclf cv_results_['params'])print("% (+/-% ffor % (meanstd params)check out best model performance print("\nbest parameters set found on development set:"clf best_params_print("best model validation accuracy:"clf best_score_tuning hyper-parameters for accuracy grid scores for all the models based on cv (+/- for {' ' 'gamma' 'kernel''linear' (+/- for {' ' 'gamma' 'kernel''rbf' (+/- for {' ' 'gamma' 'kernel''linear' (+/- for {' ' 'gamma' 'kernel''rbf' (+/- for {' ' 'gamma' 'kernel''linear' (+/- for {' ' 'gamma' 'kernel''rbf' (+/- for {' ' 'gamma' 'kernel''linear' (+/- for {' ' 'gamma' 'kernel''rbf' (+/- for {' ' 'gamma' 'kernel''linear' (+/- for {' ' 'gamma' 'kernel''rbf' (+/- for {' ' 'gamma' 'kernel''linear' (+/- for {' ' 'gamma' 'kernel''rbf' (+/- for {' ' 'gamma' 'kernel''linear' (+/- for {' ' 'gamma' 'kernel''rbf' (+/- for {' ' 'gamma' 'kernel''linear' (+/- for {' ' 'gamma' 'kernel''rbf'best parameters set found on development set{' ' 'gamma' 'kernel''linear'best model validation accuracy thusfrom the preceding output and codeyou can see how the best model parameters were obtained based on cross-validation accuracy and we get pretty awesome validation accuracy of let' take this optimized and tuned model and put it to the test on our test datags_best clf best_estimator_ tuned_y_pred gs_best predict(x_testprint('\ \ntuned model stats:'meu display_model_performance_metrics(true_labels=y_testpredicted_labels=tuned_y_predclasses=[ , ]