<jupyter_start><jupyter_text>First row already contains column names, ``header=0`` loads it from the first row<jupyter_code>dataset = pd.read_csv(dataset_url,  sep=';', header=0)  ### first row already contains column names
dataset.head()
# Dimensions of dataset
print(dataset.shape)
# 10 random rows of the dataset
print(dataset.sample(10))
# Description of dataset
print(dataset.describe())<jupyter_output>fixed acidity  volatile acidity  citric acid  residual sugar  \
count    4898.000000       4898.000000  4898.000000     4898.000000   
mean        6.854788          0.278241     0.334192        6.391415   
std         0.843868          0.100795     0.121020        5.072058   
min         3.800000          0.080000     0.000000        0.600000   
25%         6.300000          0.210000     0.270000        1.700000   
50%         6.800000          0.260000     0.320000        5.200000   
75%         7.300000          0.320000     0.390000        9.900000   
max        14.200000          1.100000     1.660000       65.800000   

         chlorides  free sulfur dioxide  total sulfur dioxide      density  \
count  4898.000000          4898.000000           4898.000000  4898.000000   
mean      0.045772            35.308085            138.360657     0.994027   
std       0.021848            17.007137             42.498065     0.002991   
min       0.009000             2.000000         [...]<jupyter_text>Splitting dataset for the ml model<jupyter_code>X = dataset.iloc[:,0:11] 
y = dataset['quality']
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=42)
from sklearn.svm import SVC
from sklearn.metrics import accuracy_score

import itertools as it<jupyter_output><empty_output><jupyter_text>Trying with different parameters<jupyter_code>parameters = {'C' : [0.5, 1.0, 2.0],
              'kernel' : ['rbf', 'sigmoid'],
             }

combinations=list(it.product(*(parameters[key] for key in parameters)))
print(combinations)
for params in combinations:
    print('Trying:',params)
    svc = SVC(C=params[0], kernel=params[1])
    svc.fit(X_train, y_train)
    y_pred = svc.predict(X_test)
    print("Accuracy:",accuracy_score(y_test, y_pred),"\n")<jupyter_output>Trying: (0.5, 'rbf')
Accuracy: 0.5102040816326531 

Trying: (0.5, 'sigmoid')
Accuracy: 0.4520717377860235 

Trying: (1.0, 'rbf')
Accuracy: 0.5528756957328386 

Trying: (1.0, 'sigmoid')
Accuracy: 0.4520717377860235 

Trying: (2.0, 'rbf')
Accuracy: 0.562152133580705 

Trying: (2.0, 'sigmoid')
Accuracy: 0.4520717377860235
{'fraction_non_alphanumeric': 0.10748031496062992, 'fraction_numerical': 0.19448818897637796, 'mean_word_length': 2.48559670781893, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '544326', 'license': 'MIT', 'n_tokens_mistral': 1204, 'n_tokens_neox': 902, 'n_words': 199, 'path': 'machine_learning/wine_quality/svc/wine_svc.ipynb', 'repo_name': 'vichitr/Hacktoberfest-2k18', 'size': '2540'}