application_vnd.jupyter.stderr_output_2.png text_plain_output_1.png
from sklearn.model_selection import GridSearchCV, StratifiedKFold

from sklearn.svm import SVC

import numpy as np

import pandas as pd

import numpy as np
import pandas as pd
train = pd.read_csv('../input/train.csv')
test = pd.read_csv('../input/test.csv')

X_train = np.array(train[['Age', 'Fare', 'Parch', 'SibSp', 'Pclass', 'Sex', 'Alone', 'Family']])
y_train = np.array(train[['Survived']]).reshape(-1)
X_test = np.array(test[['Age', 'Fare', 'Parch', 'SibSp', 'Pclass', 'Sex', 'Alone', 'Family']])

from sklearn.svm import SVC
from sklearn.model_selection import GridSearchCV, StratifiedKFold
splitter = StratifiedKFold(n_splits=5, shuffle=True, random_state=42)
c_param = [1, 2, 5, 10, 20]
param_grid = dict(C=c_param)
svc = SVC()
gs = GridSearchCV(svc, param_grid=param_grid, scoring='accuracy', verbose=1, cv=splitter)
gs.fit(X_train, y_train)
print('Best: %f using %s' % (gs.best_score_, gs.best_params_))