text_plain_output_1.png
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer

from sklearn.model_selection import GridSearchCV

from sklearn.pipeline import Pipeline

from sklearn.svm import SVC

pipeline = Pipeline(steps=[('vect', CountVectorizer()), ('cls', SVC())])
parameters = {'cls__C': (0.001, 0.01, 1, 10), 'cls__kernel': ['linear', 'poly', 'rbf'], 'cls__degree': (2, 3, 4), 'cls__gamma': [0.0001, 0.001, 0.01, 0.1, 1]}
grid_search = GridSearchCV(estimator=pipeline, param_grid=parameters, scoring='roc_auc', verbose=1, n_jobs=-1, cv=10)
grid_search.fit(X_train, y_train)