code_1.py 193 字节
Newer Older
ToTensor's avatar
ToTensor 已提交
1 2 3 4 5
from sklearn.svm import SVC # 导入SVM模型
svm = SVC(random_state = 1)
svm.fit(X_train, y_train)
y_pred = svm.predict(X_test) # 预测心脏病结果
svm_acc = svm.score(X_test, y_test)*100