我有一个关于这段代码的问题:
from sklearn import svm
model_SVC = SVC()
model_SVC.fit(X_scaled_df_train, y_train)
svm_prediction = model_SVC.predict(X_scaled_df_test)
错误信息为:
有什么想法吗?NameError
Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_14392/1339209891.py in ----> 1 svm_prediction = model_SVC.predict(X_scaled_df_test)NameError: name 'model_SVC' is not defined
from sklearn.svm import SVC
导入SVC。或者将下一行更改为model_SVC = svm.SVC()
。看看是否有效。 - Redox