https://github.com/captbaritone/clusterfach-py
A recommendation engine
https://github.com/captbaritone/clusterfach-py
Last synced: 9 months ago
JSON representation
A recommendation engine
- Host: GitHub
- URL: https://github.com/captbaritone/clusterfach-py
- Owner: captbaritone
- Created: 2016-04-17T04:52:02.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-26T17:11:08.000Z (over 9 years ago)
- Last Synced: 2025-02-15T09:17:19.524Z (11 months ago)
- Language: Python
- Size: 402 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ClusterFach
_cluster_, noun: A group of similar things or people positioned or occurring
closely together.
_fach_, noun: German. Compartment or category.
ClusterFach uses maths ([Singular value
decomposition](https://en.wikipedia.org/wiki/Singular_value_decomposition)) to
provide an easy to use suggestion engine.
Use cases might include movie recommendations for a user based on movies they
like, or suggesting roles to opera singers based on role's they've previously
sung.
Adapted from , originally for
. Thanks to Katia for finding this algorithm, and putting
the pieces together.
## Installation
1. Clone this repo
2. `pip install -r requirements.txt`
## Usage
# find_movies.py
import clusterfach
# A list of people. Each represented by a list of ids of movies they like.
people = [
[283, 120, 2792, 83],
[294, 1942, 2831, 29832, 23],
[3274, 29, 93, 291, 293],
# ...
]
# Crunch the data, this bit might take some time
clusterfach.generate_archetypes(people, cache_file='cache.npz')
# Movies I like
me = [232, 3943, 394]
movie_suggestions = cluterfach.fach_me(me, cache_file='cache.npz')
# Movies I might like
print movie_suggestions
# => [249, 2848, 2084, 283, 292]
## TODO
1. Find a good relatable example data-set
2. Create example app
3. Make variable names/methods generic
4. Add tests
5. Upload to pypi
6. Setup Travis.ci