Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vec = TfidfVectorizer()
- tfidf = vec.fit_transform(corpus_trained)
- unseen_tfidf = vec.transform(corpus)
- logreg = linear_model.LogisticRegression()
- result = logreg.fit(tfidf, Y_train).predict(unseen_tfidf)
Add Comment
Please, Sign In to add comment