import pandas as pd
from sklearn import svm, metrics

xor_input = [
    [0, 0, 0],
    [0, 1, 1],
    [1, 0, 1],
    [1, 1, 0]
]

xor_df = pd.DataFrame(xor_input)
xor_data = xor_df.ix[0:3,0:1]
xor_label = xor_df.ix[0:3,2]

clf = svm.SVC()
clf.fit(xor_data, xor_label)

pre = clf.predict(xor_data)

ac_score = metrics.accuracy_score(xor_label, pre)
print(ac_score)
