# tfidf is the vector defined previously #tfidf = TfidfVectorizer(ngram_range=(1,3), stop_words='english', lowercase=True) # Transform train_lbl['content'] to vectorizer X_train_vec_lbl = tfidf.fit_transform(train_lbl["content"]) # Size of X_train_vec_lbl and y_train_lbl print(X_train_vec_lbl.shape) print(y_train_lbl.shape)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter