Skip to content

Commit

Permalink
Release/0.6.0 (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
feldlime authored May 13, 2024
1 parent 361ba33 commit 6a83a9e
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,5 @@ jobs:
run: make test

- name: Upload coverage
if: matrix.python-version == '3.9'
uses: codecov/codecov-action@v3
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.6.0] - Unreleased
## [0.6.0] - 13.05.2024

### Added
- Warm users/items support in `Dataset` ([#77](https://github.com/MobileTeleSystems/RecTools/pull/77))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ The table below lists recommender models that are available in RecTools.
- For getting recommendations `filter_viewed` and `items_to_recommend` options are available
- For item-to-item recommendations use `recommend_to_items` method
- For feeding user/item features to model just specify dataframes when constructing `Dataset`. [Check our tutorial](examples/4_dataset_with_features.ipynb)

- For warm / cold inference just provide all required ids in `users` or `target_items` parameters of `recommend` or `recommend_to_items` methods and make sure you have features in the dataset for warm users/items. **Nothing else is needed, everything works out of the box.** Check [documentation](https://rectools.readthedocs.io/en/stable/features.html#models) to see which models support this scenarios.

## Contribution
[Contributing guide](CONTRIBUTING.rst)
Expand Down
21 changes: 16 additions & 5 deletions docs/source/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,27 @@ Item Features
This table stores data about items.
It might include category, price or any other features which may prove to be important for a recommender model.

Hot, warm, cold
~~~~~~~~~~~~~~~
There is a concept of a temperature we're using for users and items:

* **hot** - the ones that are present in interactions used for training (they may or may not have features);
* **warm** - the ones that are not in interactions, but have some features;
* **cold** - the ones we don't know anything about (they are not in interactions and don't have any features).

All the models are able to generate recommendations for the *hot* users (items).
But as for warm and cold ones, there may be all possible combinations (neither of them, only cold, only warm, both).
The important thing is that if model is able to recommend for cold users (items), but not for warm ones (see table below),
it is still able to recommend for warm ones, but they will be considered as cold (no personalisation should be expected).

All of the above concepts are combined in `Dataset`.
`Dataset` is used to build recommendation models and infer recommendations.

.. include:: dataset.rst

.. include:: models.rst

What are you waiting for? Train and apply them!

Recommendation Table
~~~~~~~~~~~~~~~~~~~~
Expand All @@ -60,11 +76,6 @@ It has a fixed set of columns, though they are different for i2i and u2i recomme
Recommendation table can also be used for calculation of metrics.


.. include:: models.rst

What are you waiting for? Train and apply them!


.. include:: metrics.rst

Oops, yeah, can't forget about them.
Expand Down
24 changes: 24 additions & 0 deletions docs/source/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,30 @@ Models
Details of RecTools Models
--------------------------


+-----------------------------+-------------------+---------------------+---------------------+
| Model | Supports features | Recommends for warm | Recommends for cold |
+=============================+===================+=====================+=====================+
| DSSMModel | Yes | Yes | No |
+-----------------------------+-------------------+---------------------+---------------------+
| EASEModel | No | No | No |
+-----------------------------+-------------------+---------------------+---------------------+
| ImplicitALSWrapperModel | Yes | No | No |
+-----------------------------+-------------------+---------------------+---------------------+
| ImplicitItemKNNWrapperModel | No | No | No |
+-----------------------------+-------------------+---------------------+---------------------+
| LightFMWrapperModel | Yes | Yes | Yes |
+-----------------------------+-------------------+---------------------+---------------------+
| PopularModel | No | No | Yes |
+-----------------------------+-------------------+---------------------+---------------------+
| PopularInCategoryModel | No | No | Yes |
+-----------------------------+-------------------+---------------------+---------------------+
| PureSVDModel | No | No | No |
+-----------------------------+-------------------+---------------------+---------------------+
| RandomModel | No | No | Yes |
+-----------------------------+-------------------+---------------------+---------------------+


See the API documentation for further details on Models:

.. currentmodule:: rectools
Expand Down
13 changes: 10 additions & 3 deletions examples/1_simple_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,13 @@
"user_recos.sort_values(\"rank\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Here is the simple example, we only used ratings to train the model and we only prepared recommendations for users who have rated movies before. But some models allow you to use explicit features, e.g. user age or item genre. And some models allow you to generate recommendations for users that have not rated any movies before. See [documentation](https://rectools.readthedocs.io/en/stable/features.html#models) for the details."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -743,9 +750,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "rect",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "rect"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -757,7 +764,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"version": "3.9.13"
},
"toc": {
"base_numbering": 1,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "RecTools"
version = "0.5.0"
version = "0.6.0"
description = "An easy-to-use Python library for building recommendation systems"
license = "Apache-2.0"
authors = [
Expand Down
2 changes: 1 addition & 1 deletion rectools/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "0.5.0"
VERSION = "0.6.0"

0 comments on commit 6a83a9e

Please sign in to comment.