There isn't enough information here to construct a clustering algorithm.

For example, let's say you have three documents using your complete word list:

  1. "art brick road";
  2. "art brick monk"
  3. "art ball road"

There is no rational way to decide that any two of these documents are more closely related that any other pairing, hence there is no basis upon which to cluster them.

You might try to introduce some artificial criteria by which they can be compared: eg. decide that shared words "lower" (say; leftmost) in your vector are more important that shared words "higher" in the vector; but such a comparison would be totally arbitrary taking no account of the semantic meaning of either the words; or the word pairings.

You might decide that a ward pairing shared by one pair of documents is "more important" than another pairing because (say) the pairing has closer proximity within the documents. But now you have 3 metrics to combine: the words pair; and the distances between them in each of the documents; but how do you combine those three values into a single number that can be compared?

And you need numbers before you can perform K-mean or other clustering algorithms.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong


In reply to Re: Clustering documents using vectors. by BrowserUk
in thread Clustering documents using vectors. by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.