I try to fit SVC
in skikit-learn
, but got TypeError: fit() missing 1 required positional argument: 'self' in the line SVC.fit(X=Xtrain, y=ytrain)
from sklearn.svm import SVC
import seaborn as sns; sns.set()
from sklearn.datasets.samples_generator import make_circles
from sklearn.model_selection import train_test_split
from sklearn.model_selection import cross_val_score
X, y = make_circles(100, factor=.2, noise=.2)
Xtrain, Xtest, ytrain, ytest = train_test_split(X,y,random_state=42)
svc = SVC(kernel = "poly")
SVC.fit(X=Xtrain, y=ytrain)
predictions = SVC.predict(ytest)