text_html_output_1.png 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_other = Pipeline(steps=[('vect', CountVectorizer()), ('cls', SVC())])
parameters_other = {'cls__C': [0.01], 'cls__kernel': ['linear'], 'cls__probability': [True], 'cls__class_weight': ['balanced']}
grid_search_other = GridSearchCV(estimator=pipeline_other, param_grid=parameters_other, scoring='roc_auc', verbose=1, n_jobs=-1, cv=10)
grid_search_other.fit(X_train_other, y_train_other)