# -*- coding: utf-8 -*-
from sklearn.svm import SVC
import numpy as np
print(X.shape,Y.shape)
X = np.random.random((10,5)) #训练数据
Y = np.array([1,0,1,0,1,0,1,0,1,0]) #训练标签
T = np.random.random((20,5)) #预测数据
print(X.shape,Y.shape)
svc=SVC(kernel='poly',degree=3,gamma=1,coef0=0) #注意函数参数说明
svc.fit(X,Y)
pre=svc.predict(T)
print(X.shape,Y.shape)
print(pre)

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
猜你喜欢
  • 2022-12-23
  • 2021-12-07
  • 2021-07-06
  • 2021-04-03
  • 2022-12-23
  • 2021-10-09
相关资源
相似解决方案