create your own pipeline.
Pipeline might include:
- extracting features (vectorize)
- deriving features (basis or polynomial functions)
- model selection
You may tune your models/hyperparameters via gridsearch
Hint: You should rebuild the model from aboveusing pipeline. You can then modify it easily!
#some libraries and starter code
from sklearn.feature_extraction.text import CountVectorizer,TfidfTransformer
from sklearn.preprocessing import FunctionTransformer
from sklearn.naive_bayes import MultinomialNB
from sklearn.ensemble import GradientBoostingClassifier,RandomForestClassifier
from sklearn.pipeline import make_pipeline
from sklearn.metrics import classification_report
from sklearn.model_selection import train_test_split
Solution