Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- descriptions = ["he liked dogs", "she liked cats", "she hated cars"]
- tfidf = TfidfVectorizer()
- trained_model = tfidf.fit_transform(descriptions)
- d = [tfidf_score, length_document, num_words]
- (Pdb) trained_model
- <5801x8954 sparse matrix of type '<type 'numpy.float64'>'
- with 48369 stored elements in Compressed Sparse Row format>
- (Pdb) trained_model[0]
- <1x8954 sparse matrix of type '<type 'numpy.float64'>'
- with 4 stored elements in Compressed Sparse Row format>
- (Pdb) trained_model[1]
- <1x8954 sparse matrix of type '<type 'numpy.float64'>'
- with 11 stored elements in Compressed Sparse Row format>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement