1
$\begingroup$

I have done text processing with TF-IDF method and as an output got a list of normalized vectors [0, 1] for each document. Such as below:

Document 1
word1:1.0, word2:0.9, ..., word_n:0

Document 2
word2:1.0, word1:0.4, ..., word_n:0
...
etc

The above is basically a list of key-values where key is a term and values are TF-IDF values, where value 1 means that the term matches the document the most compared to other terms in the set.

My question is, to what form should I transform these vectors in order to properly use fuzzy c-means clustering on them? I feel like it should be 2D matrix of something, but can't figure it out.

At the very end I would like to have a trained model which on a given input could say to what documents (based on the membership values) it belongs with the highest chance.

$\endgroup$
0
$\begingroup$

You could create a table from the TF-IDF vectors in which each feature or column represents a word, each row a document and if a word does not appear in a document use 0 as TF-IDF vector value. Then you could apply c-means clustering to this table.

$\endgroup$
0
$\begingroup$

Assign a unique column to each word.

All remaining values are zero, obviously.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.