News for hackers. Stuff that matters.
Re:A Graph of Related Subreddits by anvaka on Wednesday January 29, 2020 @02:33AM (#22178307)
Oh hey there, I'm the author of this project.

Just wanted to say thank you for sharing this! Would be happy to answer any questions - graphs are my long time hobby, and I love them!

PS: You can find more recent graphs and fun projects here: https://twitter.com/search?q=from%3Aanvaka%20min_retweets%3A...

Re:A Graph of Related Subreddits by bobosha on Wednesday January 29, 2020 @02:38AM (#22178329)
How does this infer subreddit similarity? For instance, I checked for r/AskHistorians and the results don't seem that relevant.

edit: never mind, I just read your GitHub readme. But the question still stands as if "users posting in x, also posted in y" is a good way to infer similarity. Could comparing top-ranked posts be a better comparator?

Re:A Graph of Related Subreddits by anvaka on Wednesday January 29, 2020 @02:50AM (#22178373)
I used my own metric that is based on jaccard similarity. Which in turn is based on "users who posted to X also posted to Y" metric.

That said, there are a few subreddits that are too popular and similarity results were too saturated (/r/videos, /r/funny, etc.) so I did a manual override by looking into most commonly mentioned other subreddits, and sometimes into `about` blurb of subreddit).

Please don't consider these recommendation as source of truth! It's just a fun way to discover other subreddits :).

I'm also very open to change this metric to something else - please let me know if you have any recommendations!

[1]: https://github.com/anvaka/sayit#the-data - describes the data, indexing scripts are here: https://github.com/anvaka/sayit/tree/master/scripts

[2]: Manual overrides can be found here https://github.com/anvaka/sayit-data#sayit---recommendation-...

Re:A Graph of Related Subreddits by ketralnis on Wednesday January 29, 2020 @03:26AM (#22178517)
I work for reddit and here I’ve used a similar technique to your jaccard distance but with one twist: divide by the size of the smaller subreddit (in your case, the number of unique posters that you’ve recorded). That gives you a directional relatedness, that is programming->python but not necessarily python->programming. Used this way you account for the giant subreddit problem automatically but now the results are less “amitheasshole is related to askreddit” and more like “linguisticshumor is a more niche version of linguistics”.

The great thing is that it’s actually more actionable as far as recommendations go! Everybody has already heard of the bigger version of this subreddit, but they probably haven’t heard of the smaller versions. And it’s self-correcting. As a subreddit gets bigger we are less likely to recommend it (which is great because it needs our help less)

Re:A Graph of Related Subreddits by anvaka on Wednesday January 29, 2020 @03:40AM (#22178582)
This is super awesome, thank you for sharing!

If you guys are interested in seeing how your recommendation work for the entire reddit, I'd be happy to build you a spaceship similar to this one https://github.com/anvaka/word2vec-graph .

I couldn't find an easy way to download the entire recommendation graph, but it would be awesome if we could make it work. My email is the same as this account at gmail, and twitter is all open: https://twitter.com/anvaka

Re:A Graph of Related Subreddits by yantrams on Wednesday January 29, 2020 @04:46AM (#22178914)
In case you haven't come across it already, here is a very exhaustive list of distance measures for dealing with problems of this kind - http://www.iiisci.org/journal/CV$/sci/pdfs/GS315JG.pdf

I fooled around a bit with lastfm data for band recommendation and found this sheet quite helpful.

If you are interested in learning more about asymmetrical similarity, here is a great primer by Tversky - http://www.cogsci.ucsd.edu/~coulson/203/tversky-features.pdf

Re:A Graph of Related Subreddits by anvaka on Wednesday January 29, 2020 @01:00PM (#22183684)
This is absolute treasure trove. Thank you so much!
Re:A Graph of Related Subreddits by bobosha on Wednesday January 29, 2020 @08:07AM (#22180041)
Normalizing by the user count should help.

My suggestion would be something much simpler ie. to try to compare content itself e.g. top 1000 posts from each subreddit, and estimate (say) cosine sim + Tfidf. Wouldn't that be a better indicator? Also, instead of pairwise comparison, you could try clustering (HDBSCAN for example) to reduce computational complexity.

But great work, love your visualizations!

Re:A Graph of Related Subreddits by jcims on Wednesday January 29, 2020 @03:33AM (#22178549)
Can people still make their upvotes/downvotes public? I found that useful for sussing out related subreddits when it was possible back in the day.
Re:A Graph of Related Subreddits by ethn on Wednesday January 29, 2020 @10:02PM (#22188507)
I’ve also rediscovered this in similar work I do. But upon later research I’ve learned this is called containment.
Re:A Graph of Related Subreddits by mikk14 on Wednesday January 29, 2020 @06:43AM (#22179496)
If you're interested, in the scientific literature this problem is known as "network backboning". Basically you have all nodes connected to practically all other nodes with weighted edges, and you want to know which are the edges with statistically significant weights.

I wrote on this topic [1]. My method [2] basically uses simple counts on edge weights, and then estimates the expected edge weight and its variance using Bayesian priors. It then attaches a t-score or p-value to each edge, and then you can filter out edges with too low t-score.

The idea is that weak edges can still be statistically significant if they connect "small" nodes. In any case, the library I wrote includes the implementation of a few other methods, in case they work better for your data type.

[1] https://arxiv.org/abs/1701.07336 [2] http://www.michelecoscia.com/?page_id=287

Re:A Graph of Related Subreddits by grawprog on Wednesday January 29, 2020 @04:52PM (#22186255)
>I used my own metric that is based on jaccard similarity. Which in turn is based on "users who posted to X also posted to Y" metric.

Is that really a good metric of similarity? Just myself, I post in several unrelated subreddits semi-regularly from programming to video games to music, art and even stone masonary, i've posted in subreddits for TV shows i've watched, or just completely random things.

I use reddit as a place where I can learn about and interact with people on nearly any subject or topic and I take advantage of that when I can. I'm sure my posting habits aren't that unusual. I'm just not sure that's really an accurate way to gauge similarity.

Re:A Graph of Related Subreddits by anvaka on Wednesday January 29, 2020 @05:08PM (#22186402)
Right, I don't think it's 100% accurate either. It gives just some hints what might be related, but like you said, it's not necessary the best possible measure of similarity.

Jaccard similarity does not count only the number of people who posted to A and B, it checks how many people posted to A, how many people posted to B, and how many of those people posted TOGETHER to A and B. That togetherness gives us hints what is related, and after it is computed, we can divide by the total number of poster to both A and B (independently), which brings the value to something that we can use to compare against other subreddits. If that value is close to 1, it means that almost all users who posted to A have also posted to B. If it is close to 0, then the overlap is much smaller.

Re:A Graph of Related Subreddits by dannytatom on Wednesday January 29, 2020 @04:47PM (#22186205)
This has a similar issue to the way Reddit recommends subs itself. A sub will be considered similar if it's the exact opposite due to users of one sub going to another to shitpost or brigade or etc.

I'm not sure of a fix for that, but would it be possible/helpful to weigh it by average upvote/downvote of the comments left from users of said sub? Meaning if sub A is about how much baseball sucks, and sub B is about how amazing baseball is, while determining if the 2 are similar you'd find out most posts from sub A to sub B are heavily downvoted and so probably not similar.

Re:A Graph of Related Subreddits by anvaka on Wednesday January 29, 2020 @05:11PM (#22186442)
It seems though relationship can be considered to have a sign: positive, when people mostly align in their upvote intents, and negative when people do the brigading, etc.

I'd still see ability to determine absolute value of relationship as a valuable property of a recommender

Re:A Graph of Related Subreddits by zmix on Wednesday January 29, 2020 @08:17AM (#22180109)
A lot of Reddits have "Recommended" or "Related" boxes at the side. Why don't you implement these as first, and then use the algorithm(s)?
Re:A Graph of Related Subreddits by anvaka on Wednesday January 29, 2020 @01:03PM (#22183739)
Thank you for the suggestion!

I think when I created this tool there was no recommendations on reddit.

When it was introduced later on reddit I was contemplating about using reddit's own recommendations, but at that time it was missing a few smaller subreddits, so I just put it of onto the shelf of projects to try.

Re:A Graph of Related Subreddits by varjag on Wednesday January 29, 2020 @04:38AM (#22178874)
Have to say the link between The_Donald and TwoXChromosomes was a surprising one.
Re:A Graph of Related Subreddits by Mountain_Skies on Wednesday January 29, 2020 @06:58AM (#22179584)
Probably due to both subreddits going on trolling raids on each other.
Re:A Graph of Related Subreddits by varjag on Wednesday January 29, 2020 @07:08AM (#22179622)
Reddit tries to keep a lid on brigading, it's actively policed. Surprising to see this as a major component.
Re:A Graph of Related Subreddits by MagnumOpus on Wednesday January 29, 2020 @08:46AM (#22180358)
Reddit execs give lip service to fighting brigading. It is only enforced in rare cases.
Re:A Graph of Related Subreddits by I_am_tiberius on Wednesday January 29, 2020 @02:40AM (#22178336)
I guess the amazon principle: Users who posted here, also posted there?
Re:A Graph of Related Subreddits by catach on Wednesday January 29, 2020 @02:46AM (#22178354)
The method seems surprisingly effective for a lot of subs, but also bothers me.
Re:A Graph of Related Subreddits by stared on Wednesday January 29, 2020 @05:50AM (#22179218)
Thank you for creating this project!

I share your interest in creating graphs (vide some older project of mine, a map of Stack Exchange tags https://p.migdal.pl/tagoverflow/).

When I dived into various visualization of Subreddits (as a background reading for this side-project https://observablehq.com/@stared/tree-of-reddit-sex-life), your vis was the best for exploration (out of many, many). The only other one that I found and this level was a Sigma.js-based https://www.jacobsilterra.com/subreddit_map/network/ (beautiful, but more static).

Re:A Graph of Related Subreddits by anvaka on Wednesday January 29, 2020 @01:09PM (#22183818)
Yay! Thank you for sharing the links and thank you for your kind words!

I see you are doing something with quantum tensors, which is very impressive! I'm still struggling with concept of regular tensors, and would love to have a good intuition/visualization for them - do you have any pointers?

Re:A Graph of Related Subreddits by stared on Wednesday January 29, 2020 @02:25PM (#22184762)
It depends on what you are looking for. Tensors as in physics (typically with each dimension being related to space(time)), tensors for quantum information & computing, tensors for deep learning?

I've found it illuminating to see tensor diagrams.

- https://medium.com/@pmigdal/in-the-topic-of-diagrams-i-did-w...

- https://www.math3ma.com/blog/matrices-as-tensor-network-diag...

Also, right now, we are developing a matrix visualization in https://github.com/Quantum-Game. However, it is pretty much work in progress; for a slightly more mature one, go to Quantum Game 2 website and in the element encyclopedia there is one.

I am always up for talking about tensors, so feel invited to drop me an email.

Re:A Graph of Related Subreddits by flanbiscuit on Wednesday January 29, 2020 @09:44AM (#22180990)
I love your npm package dependency tree graph, I've actually posted links to it very recently on both HN and Reddit. Awesome tool!

https://npm.anvaka.com/#/

Re:A Graph of Related Subreddits by anvaka on Wednesday January 29, 2020 @12:59PM (#22183673)
Oh thank you! I'm very glad you liked it :)!
Re:A Graph of Related Subreddits by wsinks on Wednesday January 29, 2020 @12:08PM (#22182936)
This is so cool! You've basically made a different, better version of r/findasubreddit. Which led me to think...

https://anvaka.github.io/sayit/?query=findasubreddit

Super interesting!

So many small and unknown subreddits, and one of the main connections is another subreddit called "Somebody Make This".

I'll take a peek under the hood later, but this on the surface is very cool.

Re:A Graph of Related Subreddits by anvaka on Wednesday January 29, 2020 @12:58PM (#22183659)
Thank you :)! Under the hood it is all very naive counting of users who posted to A also posted to B.
Re:A Graph of Related Subreddits by chx on Wednesday January 29, 2020 @12:25PM (#22183182)
Thanks, this is very interesting. Mind if I ask how you determine relatedness? https://anvaka.github.io/sayit/?query=UsbCHardware This subreddit is very small, I am a very active poster there and yet I recognize none of the related ones.
Re:A Graph of Related Subreddits by rewq4321 on Wednesday January 29, 2020 @01:00PM (#22183691)
I think for smaller subreddit's there's not as much data, so results are more noise. Apparently Jaccard similarity was used, except for the really big subreddits: https://github.com/anvaka/sayit

Unrelated, but had to say it somewhere in this discussion: Thanks @anvaka for your open source graph libs! Way more performant than anything else I've tried.

Re:A Graph of Related Subreddits by anvaka on Wednesday January 29, 2020 @12:57PM (#22183644)
Hi there. Here is a similar question and answer: https://news.ycombinator.com/item?id=22178373
Re:A Graph of Related Subreddits by papln on Wednesday January 29, 2020 @11:27AM (#22182296)
Small request: Can you turn off the initial jumble of nodes before the graph is built and laid out? It's distracting clutter that adds no information.

Animations are fun, but only if they convey artistic or intellectual meaning.

Also, the default zoom level is zoomed in too far (large text, not showing the wohle graph). perhaps this is because viewport resolution/size (phone vs desktop) is not taken into account when chooseing a zoom level (font size)

Re:A Graph of Related Subreddits by DLA on Thursday January 30, 2020 @06:25PM (#22197121)
anvaka: your work is just amazing! The viz you did of software repos is outstanding. I just wanted to express thanks to you for sharing as I am a big fan of all things graph as well.
Re:A Graph of Related Subreddits by ddoeth on Wednesday January 29, 2020 @06:22AM (#22179395)
I just saw your city roads project, that is so awesome! Thanks for doing that
Re:A Graph of Related Subreddits by ptah on Wednesday January 29, 2020 @03:49AM (#22178630)
any information about coverage? r/electribe is not in auto complete and generates a graph with only itself
Re:A Graph of Related Subreddits by throw_m239339 on Wednesday January 29, 2020 @10:42AM (#22181723)
Thank you, it's quite a useful app.
Re:A Graph of Related Subreddits by hooande on Wednesday January 29, 2020 @11:14AM (#22182120)
great UI for this. very novel and intuitive
Re:A Graph of Related Subreddits by anvaka on Wednesday January 29, 2020 @01:10PM (#22183828)
Thank you! I'm very happy to hear this!