This question is a follow-up to this one and is about Magic: the Gathering decks, specifically in the EDH/Commander (singleton) format:

I have a group of samples (decks), each one consisting of 100 nominally categorical datapoints (cards). Each sample is aggregated by an individual (deck builder), e.g. it's known that these are not random collections of datapoints.

The linked question is regarding how to quantitatively determine similarity between decks, but I think I need to take a step back: I want to take a subset of all the decks there are and analyze it; specifically, I want to select the subset that share a "commander" (a single card that represents how the deck is constructed) and classify them according to archetype, where an archetype is defined as some feature about how the deck operates/wins. An archetype manifests itself in the same sorts of cards being included in decks of that archetype. As an illustration, one archetype might be made up of decks that include at least 30% of a pool of 40 cards; not every deck in that archetype has all of the cards, but they all are doing more or less the same thing.

My question:

Given a subset of categorical nominal data that has some unifying aspect, does there exist a method to algorithmicaly identify classifications?


Sounds like something you could achieve with topic modelling. Essentially you need to create a matrix where every unique card is a column and every row a deck. Each element of the matrix is either a 1 or 0 depending if that card is in that deck. This is known as a term-document matrix.

Once you have this matrix you could then apply latent direchlet allocation which will form “topics” of decks that are similar. If you wanted to, you could do this separately for each commander to achieve what you are looking for.

| cite | improve this answer | |
  • $\begingroup$ Thanks for responding! How rigid is this method? Is it capable of identifying potential instances where a deck is in between two archetypes? $\endgroup$ – John Doe Jan 23 at 16:49
  • $\begingroup$ It will classify each deck into “topics” which in your case is equivalent to an archetype. I’m doing this it assigns a probability to each of these topics, so yes you will be able to tell when a deck is in between archetypes $\endgroup$ – astel Jan 23 at 17:26
  • $\begingroup$ So if each deck is a document, does that make the individual cards the tokens and all of the decks for a particular commander the corpus? $\endgroup$ – John Doe Jan 26 at 23:52
  • $\begingroup$ Yep that’s it. Depending on what you want there is a couple different ways you could do it. Model all of commanders separately (this is what you describe in your comment). Or you could include the commander as a card which would mean that the corpus would be all of your decks across all commanders $\endgroup$ – astel Jan 27 at 16:43
  • $\begingroup$ Callback from a while ago: is each deck considered its own bag of words? $\endgroup$ – John Doe Feb 24 at 20:28

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.