-
-
Save fitomad/a88b82b2c0857c81400c5dbcb8aea895 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
# Creamos el modelo | |
model = tc.recommender.item_similarity_recommender.create(training_data, | |
user_id='user_id', | |
item_id='show_id') | |
# Series similares a Stranger Things | |
recommendations = model.get_similar_items(items=[ 66732 ]) | |
... | |
# | |
# Y aquí la recomendación si te ha gustado Stranger Things | |
# | |
+---------+---------+--------------------+------+----------------+------+ | |
| show_id | similar | score | rank | name | year | | |
+---------+---------+--------------------+------+----------------+------+ | |
| 66732 | 1396 | 0.6000000238418579 | 1 | Breaking Bad | 2008 | | |
| 66732 | 60573 | 0.5 | 5 | Silicon Valley | 2014 | | |
| 66732 | 65494 | 0.3999999761581421 | 6 | The Crown | 2016 | | |
| 66732 | 87108 | 0.375 | 7 | Chernobyl | 2019 | | |
| 66732 | 71446 | 0.375 | 8 | Money Heist | 2017 | | |
| 66732 | 63247 | 0.3333333134651184 | 9 | Westworld | 2016 | | |
| 66732 | 42009 | 0.3333333134651184 | 10 | Black Mirror | 2011 | | |
+---------+---------+--------------------+------+----------------+------+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment