def grid_search_svc(X, y):
    X_train, X_test, y_train, y_test = train_test_split(
        X, y, test_size=0.1, random_state=0)
    tuned_parameters = [{'kernel': ['rbf'], 'gamma': [1e-3, 1e-4],
                         'C': [0.025, 0.1, 1, 10, 100, 1000]},
                        {'kernel': ['linear'],
                         'C': [0.025, 0.1, 1, 10, 100, 1000]}]
    scorings = ['accuracy']
    for scoring in scorings:
        model = GridSearchCV(SVC(), tuned_parameters, cv=10, scoring=scoring)
        model.fit(X_test, y_test)
        print("Best parameters set found on development set:")
        print()
        print(model.best_estimator_)
        print()
        print("Grid scores on development set:")
        print()
        for params, mean_score, scores in model.grid_scores_:
            print("%0.3f (+/-%0.03f) for %r"
                  % (mean_score, scores.std() / 2, params))
        print()

        print("Detailed classification report:")
        print()
        print("The model is trained on the full development set.")
        print("The scores are computed on the full evaluation set.")
        print()
        y_true, y_pred = y_test, model.predict(X_test)
        print(classification_report(y_true, y_pred))
        print()
dataset/ETHPy150Open dfdx/masque/masque/playground/lm_series.py/grid_search_svc/original