Skip to content

Instantly share code, notes, and snippets.

@lakshay-arora
Created April 27, 2020 05:57
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 lakshay-arora/7d09b4a355f757b08f5748be500d9ebf to your computer and use it in GitHub Desktop.
Save lakshay-arora/7d09b4a355f757b08f5748be500d9ebf to your computer and use it in GitHub Desktop.
# define the stages of the pipeline
pipeline = Pipeline(steps= [('tfidf', TfidfVectorizer(lowercase=True,
max_features=1000,
stop_words= ENGLISH_STOP_WORDS)),
('model', LogisticRegression())])
# fit the pipeline model with the training data
pipeline.fit(train.tweet, train.label)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment