Skip to main content
21 events
when toggle format what by license comment
May 23, 2017 at 12:39 history edited CommunityBot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Apr 13, 2017 at 12:44 history edited CommunityBot
replaced http://stats.stackexchange.com/ with https://stats.stackexchange.com/
Jul 11, 2016 at 3:01 vote accept Doug Fir
Jul 11, 2016 at 3:01 vote accept Doug Fir
Jul 11, 2016 at 3:01
Jul 10, 2016 at 14:26 answer added gung - Reinstate Monica timeline score: 7
Jul 10, 2016 at 14:03 history edited gung - Reinstate Monica CC BY-SA 3.0
light editing
Jul 10, 2016 at 1:47 review Close votes
Jul 10, 2016 at 14:03
Jul 6, 2016 at 2:24 history edited Doug Fir CC BY-SA 3.0
I learnt something new since posting the question and added it. Prefer to leave up in case anyone else comes across in the future.
Jun 30, 2016 at 9:27 comment added ttnphns I doubt I can help you, I'm not R user and don't know how its kmeans function work and what data it can and cannot take. Please contact with its documentation and perhaps with the articles' authors. If you find information that it is OK to input d matrix in it, please let us here know :-), 'couse it's intriguing.
Jun 30, 2016 at 9:22 comment added Doug Fir Also, I both of the articles I linked to use distance matrix as an input for kmeans which is really confusing since others are advising not to and to just use the dtm
Jun 30, 2016 at 9:14 comment added Doug Fir @ttnphns so I should run kfit <- kmeans(dtm, 2). I don't even need the matrix m right?
Jun 29, 2016 at 10:38 history tweeted twitter.com/StackStats/status/748103365893173248
Jun 29, 2016 at 9:29 history edited ttnphns CC BY-SA 3.0
edited title
Jun 29, 2016 at 8:47 comment added ttnphns (cont.) But as said before, my analysis (b) treated its input data as data matrix, not as distance matrix. Therefore, your analysis did it so too. I conclude that your K-means function is not designed to take in distance matrices (or you failed to play such an option if it does exist), it is standard K-means requiring data matrices. It is a mistake to try to feed it with a distance matrix. Your clustering results were therefore erroneous. So was my conclusion.
Jun 29, 2016 at 8:47 comment added ttnphns What I've done in SPSS with your data was this. I ran K-means with inputs (a) your document term matrix tdm; (b) with your euclidean distance matrix d. SPSS's K-means treats input always as cases X variables data and clusters the cases. As initial centres, I input in both analyses the output centres of your analysis - cluster means. Results: in analysis (b), but not in (a), I got final centres identical to the input centres. That means that K-means in (b) could not further improve the cluster centres, which implies that analysis (b) coincides with the k-means analysis done by you.
Jun 29, 2016 at 8:46 comment added Doug Fir Hi @ttnphns kfit is a variable of kfit <- kmeans(d, 2) in the example script I made. There's no actual kfit function
Jun 29, 2016 at 8:12 comment added ttnphns Where is kfit function documentation available? I've looked inside the tm library cran.r-project.org/web/packages/tm/tm.pdf and found no kfit there.
Jun 29, 2016 at 5:30 history edited Doug Fir CC BY-SA 3.0
Slightly modified wording
Jun 29, 2016 at 4:00 history edited Doug Fir CC BY-SA 3.0
spelling
Jun 29, 2016 at 2:16 comment added Doug Fir If downvoting please leave a comment letting me know why so I can try to amend
Jun 29, 2016 at 1:14 history asked Doug Fir CC BY-SA 3.0