Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created August 19, 2020 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/46aae0114aabb005e2e41b581289d940 to your computer and use it in GitHub Desktop.
Save amankharwal/46aae0114aabb005e2e41b581289d940 to your computer and use it in GitHub Desktop.
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.pipeline import Pipeline
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.linear_model import SGDClassifier
pipeline_sgd = Pipeline([
('vect', CountVectorizer()),
('tfidf', TfidfTransformer()),
('nb', SGDClassifier()),])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment