Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated readme, docs and examples #115

Merged
merged 15 commits into from
Mar 22, 2024
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ To remove virtual environment run
make clean
```

## RecTools.Team
## RecTools Team

- [Emiliy Feldman](https://github.com/feldlime)
- [Ildar Safilo](https://github.com/irsafilo)
- [Daniil Potapov](https://github.com/sharthZ23)
- [Igor Belkov](https://github.com/OzmundSedler)
- [Artem Senin](https://github.com/artemseninhse)
- [Emiliy Feldman](https://github.com/feldlime) [Maintainer]
- [Daria Tikhonovich](https://github.com/blondered) [Maintainer]
- [Alexander Butenko](https://github.com/iomallach)
- [Mikhail Khasykov](https://github.com/mkhasykov)
- [Daria Tikhonovich](https://github.com/blondered)
- [Andrey Semenov](https://github.com/In48semenov)
- [Mike Sokolov](https://github.com/mikesokolovv)

Previous contributors: [Ildar Safilo](https://github.com/irsafilo) [ex-Maintainer], [Daniil Potapov](https://github.com/sharthZ23) [ex-Maintainer], [Igor Belkov](https://github.com/OzmundSedler), [Artem Senin](https://github.com/artemseninhse), [Mikhail Khasykov](https://github.com/mkhasykov)

14 changes: 8 additions & 6 deletions examples/4_dataset_with_features.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,24 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import threadpoolctl\n",
"\n",
"import numpy as np\n",
"import pandas as pd\n",
"\n",
"from implicit.als import AlternatingLeastSquares\n",
"\n",
"from rectools import Columns\n",
"from rectools.dataset import Dataset\n",
"from rectools.models import ImplicitALSWrapperModel\n",
"\n",
"os.environ[\"OPENBLAS_NUM_THREADS\"] = \"1\" # For implicit ALS"
"# For implicit ALS\n",
"os.environ[\"OPENBLAS_NUM_THREADS\"] = \"1\"\n",
"threadpoolctl.threadpool_limits(1, \"blas\")"
]
},
{
Expand Down Expand Up @@ -794,9 +796,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "rect",
"display_name": ".venv",
"language": "python",
"name": "rect"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -808,7 +810,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"version": "3.9.12"
},
"toc": {
"base_numbering": 1,
Expand Down
10 changes: 7 additions & 3 deletions examples/5_benchmark_iALS_with_features.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"outputs": [],
"source": [
"import os\n",
"import threadpoolctl\n",
"import warnings\n",
"from pathlib import Path\n",
"\n",
Expand All @@ -39,8 +40,11 @@
"from implicit.als import AlternatingLeastSquares\n",
"\n",
"warnings.filterwarnings('ignore')\n",
"os.environ[\"OPENBLAS_NUM_THREADS\"] = \"1\" # For implicit ALS\n",
"sns.set_theme(style=\"whitegrid\")"
"sns.set_theme(style=\"whitegrid\")\n",
"\n",
"# For implicit ALS\n",
"os.environ[\"OPENBLAS_NUM_THREADS\"] = \"1\"\n",
"threadpoolctl.threadpool_limits(1, \"blas\")"
]
},
{
Expand Down Expand Up @@ -1273,7 +1277,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"version": "3.9.12"
}
},
"nbformat": 4,
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ version = "0.4.2"
description = "An easy-to-use Python library for building recommendation systems"
license = "Apache-2.0"
authors = [
"Emiliy Feldman <feldlime@yandex.ru",
feldlime marked this conversation as resolved.
Show resolved Hide resolved
"Daria Tikhonovich <daria.m.tikhonovich@gmail.com>",
"Daniil Potapov <sharth23@gmail.com>",
"Ildar Safilo <irsafilo@gmail.com>",
"Emiliy Feldman <feldlime@yandex.ru",
"Alexander Butenko <a.butenko.o@gmail.com>",
"Julia Karamnova <juliakaramnova@yandex.ru>",
"Artem Senin <artemseninhse@gmail.com>",
"Mikhail Khasykov <mkhasykov@gmail.com>",
"Daria Tikhonovich <daria.m.tikhonovich@gmail.com>",
"Mike Sokolov <mikesokolovv@gmail.com>",
"Andrey Semenov <in48semenov@yandex.ru>",
]
maintainers = [
"Daniil Potapov <sharth23@gmail.com>",
"Ildar Safilo <irsafilo@gmail.com>",
"Emiliy Feldman <feldlime@yandex.ru",
"Daria Tikhonovich <daria.m.tikhonovich@gmail.com>",
]
Expand Down
2 changes: 1 addition & 1 deletion rectools/metrics/novelty.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class MeanInvUserFreq(MetricAtK):
to the number of users who interacted with it.

.. math::
MIUF@k = -(\sum_{i=1}^{k+1} \log_{2} (users(i) / n\_users)) / k
MIUF@k = -(\sum_{i=1}^{k} \log_{2} (users(i) / n\_users)) / k

where
- `users(i)` is number of users that previously interacted with item with rank `i`.
Expand Down
2 changes: 1 addition & 1 deletion rectools/metrics/serendipity.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Serendipity(MetricAtK):
Evaluates novelty and relevance together.

.. math::
Serendipity@k = (\sum_{i=1}^{k+1} max(p(i) - pu(i), 0) * rel(i)) / k
Serendipity@k = (\sum_{i=1}^{k} max(p(i) - pu(i), 0) * rel(i)) / k

where
- :math:`p(i) = (n\_items + 1 - i) / n\_items`
Expand Down
Loading