Skip to content

Instantly share code, notes, and snippets.

@abevieiramota
Created May 14, 2014 02:06
Show Gist options
  • Save abevieiramota/72b3bec6087d6488f77e to your computer and use it in GitHub Desktop.
Save abevieiramota/72b3bec6087d6488f77e to your computer and use it in GitHub Desktop.
from sklearn.svm import SVC
import numpy as np
from matplotlib import pyplot as pl
X = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4]]
y = [0, 1, 2, 0, 1]
model = SVC()
model.fit(X, y)
model.predict([[1,2], [2,3]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment