October 2018
Intermediate to advanced
472 pages
10h 57m
English
Now, let's initialize the TF-IDF vectorizer and define a few parameters:
There are many more parameters that you can look into, configure, and play around with:
from sklearn.feature_extraction.text import TfidfVectorizervectorizer = TfidfVectorizer(min_df=0, ngram_range=(2, 4), strip_accents='unicode',norm='l2' , encoding='ISO-8859-1')
Now, we train the model on the questions:
# We create an array for our train data set (questions) ...
Read now
Unlock full access