I am trying to do some clustering. I have a dataset that is very sparse - with the majority of features only occurring in a single vector.

Here is a list of our features: https://gist.github.com/scrooloose/5963725dc88e5d15d74dcae522bebf82

I am looking for any suggestions/hints/pointers as to how we can merge some of these isolated features together. This should hopefully make my clustering experiments more successful.

For example, from a manual inspection of the data, I can see this group of features that could be all merged into a feature like "health" or perhaps "mental health" + "general health" or similar.

618: Mental Health Research
619: Mental disorder
1616: mental health
1617: mental illness
1618: men’s health
410: Genital wart
402: Genomic Medicine
476: Hygiene

Another example is this set of features that could be merged into something like "education":

536: Kiir Primary School
591: Makonzi Boarding School
609: Mathematics
670: New York University
300: Education
301: Educational psychology
349: Female education

Any thoughts would be very welcome, thanks :)

Side note: These features are keywords as returned from alchemy (http://www.alchemyapi.com/). Resulting from keyword searches for a set of URLS. The intention is to cluster the URLs (and hence they companies they represent) by these keywords.


If I understand correctly you want to cluster urls by using the keywords extracted as features. As these features are really sparse, you can try to use dimensionality reductions methods to help you.

One way is to treat each URL keywords as a document. Then you can use document embeddings algorithms such as LDA or doc2vec that learn denser representations of your documents.

If you want to group keywords, you can try to use word embeddings methods that learn representations of words. Using this you can then measure the similarity between words and groups of words. An example is the well-known word2vec. Recent methods like FastText can be alternative that take the morphology into account.

| improve this answer | |
  • $\begingroup$ Thanks @Bernard, I will investigate these methods at work this week. I'm quite new to this whole area of machine learning / data science. It's all a bit overwhelming - so I appreciate the pointers :-) $\endgroup$ – scrooloose Nov 7 '16 at 14:41
  • $\begingroup$ @scrooloose glad it's helpful! $\endgroup$ – Bernard Nov 7 '16 at 15:40

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.