2
$\begingroup$

I've trained a recommendation system to recommend steam games based on game tags. An example output is shown below, where GAME is the game recommended based on the similarity score.

Game to recommend for: Total War: WARHAMMER

GAME: Total War: WARHAMMER                     Similarity: 1.0
GAME: Phantom Doctrine                         Similarity: 0.97
GAME: Total War: THREE KINGDOMS                Similarity: 0.96
GAME: Warhammer 40,000: Dawn of War II         Similarity: 0.96
GAME: Total War: WARHAMMER II                  Similarity: 0.95
GAME: Warhammer 40,000: Dawn of War II Chaos Rising Similarity: 0.94

Game to recommend for: Age of Empires II: Definitive Edition

GAME: Age of Empires II: Definitive Edition    Similarity: 1.0
GAME: Rise of Nations: Extended Edition        Similarity: 0.97
GAME: Age of Empires II (2013)                 Similarity: 0.97
GAME: Stronghold Crusader HD                   Similarity: 0.96
GAME: Age of Mythology: Extended Edition       Similarity: 0.95
GAME: Medieval II: Total War Kingdoms          Similarity: 0.95

The model used here is based on embeddings which are determined by a neural network. After training I have two matrices containing the embeddings:

  1. Games Matrix: n games * embedding size
  2. Tag Matrix: n tags * embedding size

The embedding size for both matrices are the same and the similarity score is calculated by the cosine distance of the game in question to all other games.

Would it be possible to find games similar to other games minus a given tag, for example, TOTAL WAR: WARHAMMER has the following tags:

  • Strategy
  • Fantasy
  • RTS
  • War
  • Grand Strategy

Say I like this game but I don't like the Fantasy element, could I somehow remove the Fantasy element when making a recommendation? Would a simple operation say Total War: WARHAMMER embedding - Fantasy embedding and then find similar matches work?

$\endgroup$

1 Answer 1

0
$\begingroup$

One option is to train a single embedding space with all the information.

If you use Word2Vec in Genism, positive and negative operations are built-in. That is similar to how word analogies are calculated.

The code would be something like:

import gensim

word2vec_model = gensim.models.Word2Vec(docs)
word2vec_model.most_similar(positive=['Total War', 'WARHAMMER'],  
                            negative=['Fantasy'])
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.