SHARE
TWEET

Untitled

a guest Oct 14th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. vect = CountVectorizer()
  2. tfidf = TfidfTransformer()
  3. clf = SGDClassifier()
  4.  
  5. vx = vect.fit_transform(X_train)
  6. tfidfx = tfidf.fit_transform(vx)
  7. predicted = clf.fit_predict(tfidf)
  8.  
  9. #Evaluate on text
  10. vx = vect.transform(X_test)
  11. tfidf = tfidf.transform(vx)
  12. predicted = clf.predict(tfidfX)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top