in

Grouping together clusters having similar words


I am currently looking at clustering for a specific task. Using k-means and elbow method for determining the number of clusters, I have got the following results:

Cluster 0 : tv, actor, peopl, reaction, health, media, advers, shake, news, death, time, articl, receiv, subscrib, updat, train, patreon, human, list, famili, report, experiment, virus, jan, post
Cluster 1 : dr, penn, feb, tv, video, watch, com, explain, movie, popul, ginger, https, onlin, site, kill, becaus, facebook, world, alaska, m, biql, oct, medic, www
Cluster 2 : explain, popul, ginger, month, work, start, video, tv, sherri, tenpenni, dr, view, requir, jul, com, mar, februari, woodi, coin, lewrockwel, legaci, feb, newspaper, woodybay, jepopul
Cluster 3 : inform, immun, test, anim, respons, hyper, veri, import, tenpenni, attempt, previous, dr, popul, explain, tv, sherri, interview, ginger, feb, reinett, senum, befor, real, new, jan

Clusters 1, 2 and 3 have similar content so I guess they might be considered as one unique topic. Cluster 0 has many terms that make it different from others.

Reducing the number of clusters from 4 to 2, I get two clusters with similar terms, so I loose information from Cluster 1.
I am not familiar with clustering tasks, but I would like to know how to group together Clusters which have similar words. I was thinking of using e.g., cosine similarity to check similar words within the clusters and merge clusters that are similar above a certain threshold.
Does anyone had similar problems with clustering?

The code I have used for getting the above clusters is:

kmeans = KMeans(n_clusters = 4, n_init = 20, n_jobs = 1) 
kmeans.fit(X3)
common_words = kmeans.cluster_centers_.argsort()[:,-1:-26:-1]
for num, centroid in enumerate(common_words):
    print('Cluster '+str(num) + ' : ' + ', '.join(words[word] for word in centroid))



Source: https://stackoverflow.com/questions/70534851/grouping-together-clusters-having-similar-words

An e-commerce UI concept in Flutter for Android and iOS

A project feedback tracker for fellow students at the Turing School of Software & Design