Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
436 views
in Technique[技术] by (71.8m points)

python - What's exactly ntc form in tf-idf vector space?

I have a collection of text documents. I've been asked to show each document in tf-idf vector space and in ntc form and then, train a svm model based on documents' vectors in python. What does ntc exactly mean here?

I Found that it's the same as tf-idf weights with one step of normalization which is called "cosine normalization". But i can't find information about such thing. I found "cosine similarity" which is in my idea different from "cosine normalization". Are they the same? And how can i create this vector in python?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I suggest the sklearn.feature_extraction.text.TfidfVectorizer, scikit learn is a bib in python used for training machine learning model, it is easy and very useful,


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...