Answers for "sklearn support vector machine"

9

scikit learn svm

from sklearn import svm
X = [[0, 0], [1, 1]]
y = [0, 1]
clf = svm.SVC()
clf.fit(X, y)
clf.predict([[2., 2.]])
Posted by: Guest on July-29-2020
0

sklearn support vector machine

from sklearn import svm
X = [[0, 0], [2, 2]]
y = [0.5, 2.5]
regr = svm.SVR()
regr.fit(X, y)

regr.predict([[1, 1]])
Posted by: Guest on May-25-2021

Code answers related to "sklearn support vector machine"

Browse Popular Code Answers by Language