import pandas as pd
from sklearn import svm
### Read the CSV ###
df = pd.read_csv('C:/Users/anagha/Documents/Python Scripts/sampleData.csv')
df
from sklearn.cross_validation import train_test_split
train, test = train_test_split(df, train_size = 0.8)
train
test
x_column=['Userid','day_of_week','hour_of_day','minute_of_hour']
y_column = ['thermostat']
svc = svm.SVC()
model = svm.svc(kernel='linear', c=1, gamma=1)
我收到一个错误 AttributeError: 'module' object has no attribute 'svc'。尝试了很多技术,但都没有用。我是 python 的新手,非常感谢您的帮助
最佳答案
关于python - “模块”对象没有属性 'svc',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40604568/