from sklearn.svm import LinearSVC 标准化后 svc=LinearSVC(C=1) svc.fit(X_scaled,y) 非线性 1.多项式特征 2.多项式核 from sklearn.svm import SVC SVC(kernel="poly",degree=3,C=1) SVC(gamma=1.0,kernel="rbf") 回归 from sklearn.svm import LinearSVR 标准化后 svr=LinearSVR(epsilon=1) svr.fit(X_scaled,y)