Skip to main content

Podcast recommendation algorithm in Neo4j

Project description

PodcastRecommendation

0.1.6

Podcast Recommendation Algorithm
Documentación completa

Instalar

python3 -m pip install podcast-recommendation
pip install podcast-recommendation
pip install podcast-recommendation==0.1.6

Uso

Import

from podcast_recommendation.algorithm import PodcastRecommendation

Crear objeto

Para utilizarlo debe tener una DataBase abierta en Neo4j con el plugin de Data Science db

pr = PodcastRecommendation('bolt://localhost:7687', ('neo4j', 'password'), verbose=True)
Reading x_train
Reading y_train
Training model
Training complete

Generar grafo

pr.build_graph(verbose=True)
Reading categories
Reading ratings
Creating categories, categories and IsA
Creating users, categories and ratings
Build complete

Se genera un grafo como el siguiente: grafo

Generar recomendaciones

Para recomendar podcast al usuario 6C561484AED5C02

pr.recommend(user_id='6C561484AED5C02')
                          podcast_id     proba
47  b4c3c3ebdd76e284f7d9fa358ac82030  0.999225
31  c9add5e9e81a4b3ca963adab5b87083f  0.999216
30  a37fb116709bfdb2dd58ea4f784cb815  0.999042
42  a3a535f66c7e8004e7dc54c2b2829a9e  0.999038
43  b70d658c901897359bb848cf876cbcbc  0.998779
...

Eliminar el grafo

pr.delete_all()

Eliminar rating

Eliminar rating entre usuario 6C561484AED5C02 y podcast a3a535f66c7e8004e7dc54c2b2829a9e

pr.delete_rtg(user_id='6C561484AED5C02', podcast_id='a3a535f66c7e8004e7dc54c2b2829a9e')

Crear rating

Crear rating de 5 entre usuario 6C561484AED5C02 y podcast a3a535f66c7e8004e7dc54c2b2829a9e

pr.create_rtg(user_id='6C561484AED5C02', podcast_id='a3a535f66c7e8004e7dc54c2b2829a9e', rating=5)

Crear usuario

Crear usuario de id A1A1A1A1A1A1A1

pr.create_user(user_id='A1A1A1A1A1A1A1')

Crear podcast

Crear podcast de id a1a1a1a1a1a1a1a1a1a1a1

pr.create_podcast(podcast_id='a1a1a1a1a1a1a1a1a1a1a1')

Crear categoria

Crear categoria de nombre cat e id 99

pr.create_category(category='cat', category_id=99)

Crear relación IsA

Crear relación podcast de id a1a1a1a1a1a1a1a1a1a1a1 IsA categoria de nombre cat

pr.create_IsA(podcast_id='a1a1a1a1a1a1a1a1a1a1a1', category='cat')

Cerrar driver

pr.close()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

podcast_recommendation-0.1.8.tar.gz (51.0 kB view details)

Uploaded Source

Built Distribution

podcast_recommendation-0.1.8-py3-none-any.whl (56.4 kB view details)

Uploaded Python 3

File details

Details for the file podcast_recommendation-0.1.8.tar.gz.

File metadata

File hashes

Hashes for podcast_recommendation-0.1.8.tar.gz
Algorithm Hash digest
SHA256 aadf2ffd9035afa386e97d8317c0b482c23ad9ea027e8ef78ea2e0b67b307343
MD5 243bb75593d9c4abb01501050b9bc456
BLAKE2b-256 40a0ae1317dadf8d8ab45cd9dff7a8b4316daef2f4762b77a680bd2207144936

See more details on using hashes here.

File details

Details for the file podcast_recommendation-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for podcast_recommendation-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5564d20f778450f0a8f75ce60649892d4fef229b430bdb2abaeb32f37db1c9d8
MD5 bf16f798831a15af54cd8db350f2fe12
BLAKE2b-256 d9913f063bb669a8ef3be351d8d190f6053081221b51ce6b46fd3facabb36c10

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page