AttributeError: 'TfidfVectorizer' object has no attribute 'tranform'
AttributeError: 'TfidfVectorizer' object has no attribute 'tranform'
我一直收到此代码的错误,
x_predict = ['facebook.com', 'google.com/search=phish', 'wikipedia.com']
x_predict = vectorizer.tranform(x_predict)
y_predict = lgr.predict(x_predict)
打印(y_predict)
这是拼写错误:
使用transform
代替tranform
x_predict = vectorizer.transform(x_predict)
我一直收到此代码的错误,
x_predict = ['facebook.com', 'google.com/search=phish', 'wikipedia.com']
x_predict = vectorizer.tranform(x_predict)
y_predict = lgr.predict(x_predict)
打印(y_predict)
这是拼写错误:
使用transform
代替tranform
x_predict = vectorizer.transform(x_predict)