application_vnd.jupyter.stderr_output_1.png
from sklearn import svm

from sklearn.preprocessing import LabelEncoder

import numpy as np # linear algebra

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

data = pd.read_csv('../input/mushrooms.csv')

from sklearn.preprocessing import LabelEncoder
labelencoder = LabelEncoder()
for col in data.columns:
    data[col] = labelencoder.fit_transform(data[col])

data = np.array(data)
_length = 8000
train, test = (data[0:_length,], data[_length:,])
Xtrain, ytrain = (train[:, 1:], train[:, 0])
Xtest, ytest = (test[:, 1:], test[:, 0])

from sklearn import svm
model = svm.SVC(kernel='linear', gamma=1)
model.fit(Xtrain, ytrain)
scr = model.score(Xtrain, ytrain)
print(scr)
predicted = model.predict(Xtest)
print(predicted)
dif = predicted - ytest
print(dif)