Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. descriptions = ["he liked dogs", "she liked cats", "she hated cars"]
  2. tfidf = TfidfVectorizer()
  3. trained_model = tfidf.fit_transform(descriptions)
  4.  
  5. d = [tfidf_score, length_document, num_words]
  6.  
  7. (Pdb) trained_model
  8. <5801x8954 sparse matrix of type '<type 'numpy.float64'>'
  9. with 48369 stored elements in Compressed Sparse Row format>
  10. (Pdb) trained_model[0]
  11. <1x8954 sparse matrix of type '<type 'numpy.float64'>'
  12. with 4 stored elements in Compressed Sparse Row format>
  13. (Pdb) trained_model[1]
  14. <1x8954 sparse matrix of type '<type 'numpy.float64'>'
  15. with 11 stored elements in Compressed Sparse Row format>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement