Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Aug 19, 2020
Embed
What would you like to do?
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