更新 function.py
Gitea Actions Test / Challenge-Actions (push) Successful in 41s

This commit is contained in:
cy
2024-12-03 10:30:54 +08:00
parent 8f049ba58d
commit f35cdc0b77
+1 -1
View File
@@ -81,7 +81,7 @@ def train_svm(X, y, other_params=None):
- other_params (str): 其它参数,可选设置。若需设置其它参数,必须设置其默认值,否则将无法通过自动评测,成绩为零。
Returns:
- SVC: 训练好的SVM模型。
- SVC: 训练好的SVC模型。
"""
model = SVC(kernel='rbf', C=1.0, gamma='scale', random_state=42)
model.fit(X, y)