Skip to content

Commit

Permalink
- remove redundant models #15
Browse files Browse the repository at this point in the history
- fix docutils to 0.16 so that bullet lists display normally
- update docs #7
  • Loading branch information
Darel13712 committed Oct 19, 2021
1 parent dbc8d21 commit d04a39a
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 531 deletions.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Welcome to RePlay's documentation!
pages/installation
pages/spark
pages/modules
pages/useful



Expand Down
1 change: 0 additions & 1 deletion docs/pages/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ Modules
modules/splitters
modules/data_preparator
modules/distributions
useful_data/content

13 changes: 0 additions & 13 deletions docs/pages/modules/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ ___________________
"K-Nearest Neighbours", "PySpark"
"Alternating Least Squares", "PySpark"
"SLIM", "PySpark"
"Classifier Recommender", "PySpark"
"Stack Recommender", "PySpark"
"Neural Matrix Factorization", "Python CPU/GPU"
"MultVAE", "Python CPU/GPU"
"Word2Vec Recommender", "Python CPU/GPU"
"ADMM SLIM", "Python CPU"
"Wilson Recommender", "Python CPU"
"Обертка Implicit", "Python CPU"
"Обертка LightFM", "Python CPU"
"Stack Recommender", "Depends on base models"


To get more info on how to choose base model, please see this :doc:`page </pages/useful_data/algorithm_selection>`.
Expand Down Expand Up @@ -98,22 +95,12 @@ and :math:`w_{ij}\ge 0`
.. autoclass:: replay.models.SLIM
:special-members: __init__

Classifier Recommender
``````````````````````
.. autoclass:: replay.models.ClassifierRec
:special-members: __init__


Cluster Recommender
```````````````````
.. autoclass:: replay.models.ClusterRec
:members:

Stack
`````
.. autoclass:: replay.models.Stack
:special-members: __init__


Neural models with distributed inference
________________________________________
Expand Down
9 changes: 9 additions & 0 deletions docs/pages/useful.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Useful Info
============


.. toctree::
:maxdepth: 2
:caption: Contents:

How to choose a recommender <useful_data/algorithm_selection.md>
33 changes: 20 additions & 13 deletions docs/pages/useful_data/algorithm_selection.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
## How to choose a recommender

#### Input Data

- _What is the input?_

RePlay models differ by types of data they can process:
- Collaborative use only user-item interaction logs.
- Content-based use only user or item features.
- Hybrid can use both log and features.

- Collaborative use only user-item interaction logs.
- Content-based use only user or item features.
- Hybrid can use both log and features.
<br />

- _Are interactions explicit?_
Our information can be either _explicit_, such as ratings, or _implicit_ such as view, number of play counts.

Our information can be either _explicit_ e.g. ratings, or _implicit_ e.g. view, number of play counts.
\
Some models transfrom any type of data to implicit (_unary ratings_).

- _Will there be new users?_
Some models need to be completely retrained to give predictions for new users while others don't.

Some models need to be completely retrained to give predictions for new users with few interactions while others don't.

- _Will there be new items?_
The same goes for new items.

| Algorithm | Data | Interactions | Cold Users | Cold Items |
The same goes for new items.

| Algorithm | Data | Interactions | New Users | New Items |
| ---------------|--------------|-------|-------|-------|
|Popular Recommender |Collaborative | converted to unary ratings | + | - |
|Popular By Users |Collaborative | implicit feedback | - | - |
|Wilson Recommender |Collaborative | binary ratings | + | - |
|Random Recommender |Collaborative | converted to unary ratings | + | + |
|K-Nearest Neighbours |Collaborative | converted to unary ratings | + | - |
|Classifier Recommender |Content-based | binary ratings | + | + |
|Alternating Least Squares |Collaborative | implicit feedback | - | - |
|Neural Matrix Factorization|Collaborative | converted to unary ratings | - | - |
|SLIM |Collaborative | unary ratings, explicit feedback | + | - |
Expand All @@ -31,15 +40,15 @@ Some models transfrom any type of data to implicit (_unary ratings_).
|Word2Vec Recommender |Collaborative | converted to unary ratings | + | - |
|LightFM Wrap |Hybrid | [depends on loss](https://making.lyst.com/lightfm/docs/lightfm.html#lightfm) | + | + |
|Implicit Wrap |Collaborative | [depends on model](https://implicit.readthedocs.io/en/latest/index.html) | - | - |
|Stack Recommender |Hybrid | `*` | `*` | `*` |
|Two Stages Scenario |Hybrid | converted to unary ratings for second level | `*` | `*` |

`*` - depends on base models.

#### Model requirements

* _Should recommendations be personalized?_
* _Should cold users get recommendations?_ (users without interactions).
* _Should model recommend cold items?_ (With no interactions).
* _Should cold users get recommendations?_ (without any interactions).
* _Should model recommend cold items?_ (that no one interacted with).
* _Should model be able to recommend unseen items?_

| Algorithm | Personalized | Cold Users | Cold Items | Recommends Unseen Items |
Expand All @@ -49,7 +58,6 @@ Some models transfrom any type of data to implicit (_unary ratings_).
|Wilson Recommender | - | + | - | + |
|Random Recommender | - | + | + | + |
|K-Nearest Neighbours | + | + | - | + |
|Classifier Recommender | + | + | + | + |
|Alternating Least Squares | + | - | - | + |
|Neural Matrix Factorization | + | - | - | + |
|SLIM | + | - | - | + |
Expand All @@ -58,7 +66,6 @@ Some models transfrom any type of data to implicit (_unary ratings_).
|Word2Vec Recommender | + | - | - | + |
|LightFM Wrap | + | + | + | + |
|Implicit Wrap | + | - | - | + |
|Stack Recommender | + | `*` | `*` | `*` |
|Two Stages Scenario | + | `*` | `*` | `*` |

`*` - depends on base models.
Expand Down
6 changes: 0 additions & 6 deletions docs/pages/useful_data/content.rst

This file was deleted.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ pylint = "*"
Sphinx = "*"
sphinx-rtd-theme = "*"
sphinx-autodoc-typehints = "*"
docutils = 0.16
recommonmark = "*"
sphinx-markdown-tables = "*"
ghp-import = "*"
Expand Down
2 changes: 0 additions & 2 deletions replay/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from replay.models.association_rules import AssociationRulesItemRec
from replay.models.base_rec import Recommender
from replay.models.base_torch_rec import TorchRecommender
from replay.models.classifier_rec import ClassifierRec
from replay.models.implicit_wrap import ImplicitWrap
from replay.models.knn import KNN
from replay.models.lightfm_wrap import LightFMWrap
Expand All @@ -24,5 +23,4 @@
from replay.models.slim import SLIM
from replay.models.wilson import Wilson
from replay.models.word2vec import Word2VecRec
from replay.models.stack import Stack
from replay.models.cluster import ClusterRec
221 changes: 0 additions & 221 deletions replay/models/classifier_rec.py

This file was deleted.

0 comments on commit d04a39a

Please sign in to comment.