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

KL-UCB #59

Conversation

Arkadiy-Vladimirov
Copy link

The PR proposes KL-UCB recommender based on the article by Aurélien Garivier and Olivier Cappé. As a recommender model KL-UCB operates just as the regular UCB with the only difference in upper bound computation. This allowed to implement KL-UCB as a subclass of UCB with basically the only _calc_item_popularity method overridden - one that calculates the bound. __init__ method is slightly changed only to provide more adequate default parameter exploration_coef = 0 as it was claimed to be the most suitable in practice by the authors of the article. You may read more information on KL-UCB when recompile the documentation or in the class docstring directly. Evaluation is done in 02_model_comparison.ipynb notebook. You may take a look at metrics there or in the picture below.

KL-UCB_metrics

@shashist

This comment was marked as resolved.

replay/models/kl_ucb.py Outdated Show resolved Hide resolved
replay/models/kl_ucb.py Outdated Show resolved Hide resolved
@Arkadiy-Vladimirov
Copy link
Author

KL_UCB uses log with both positive and negative relevance. Please check fit_predict_add_res() in notebook to use pos_neg_train for KL_UCB

It does, as a child class of UCB (in fit_predict_add_res() any instance of UCB uses pos_neg_train)

@shashist

This comment was marked as resolved.

@shashist shashist closed this Aug 29, 2023
@shashist shashist reopened this Aug 29, 2023
@shashist shashist self-requested a review August 29, 2023 15:30
Copy link
Collaborator

@shashist shashist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code part is ok. @Arkadiy-Vladimirov please sync this PR with recent changes and fix CI

shashist and others added 6 commits October 11, 2023 13:54
Add BayesUCB to DDPG and accelerated the speed of learning

See merge request ai-lab-pmo/mltools/recsys/RePlay!94
[CI] Running CI in CI_DEFAULT_BRANCH and publish dev packages

See merge request ai-lab-pmo/mltools/recsys/RePlay!103
Fix package registry path

See merge request ai-lab-pmo/mltools/recsys/RePlay!104
@shashist shashist changed the base branch from main to refactoring October 17, 2023 08:25
EgorBodrov and others added 15 commits October 20, 2023 10:30
Move some functionality to experimental part

See merge request ai-lab-pmo/mltools/recsys/RePlay!93
Add dataset functionality

See merge request ai-lab-pmo/mltools/recsys/RePlay!102
[Feature] Building experimental package

See merge request ai-lab-pmo/mltools/recsys/RePlay!108
Add new splitters

See merge request ai-lab-pmo/mltools/recsys/RePlay!105
Feature/add new preprocessing

See merge request ai-lab-pmo/mltools/recsys/RePlay!111
Update metrics interfaces

See merge request ai-lab-pmo/mltools/recsys/RePlay!112
Fix metrics

See merge request ai-lab-pmo/mltools/recsys/RePlay!114
Tatiana Bysheva and others added 10 commits November 16, 2023 18:33
Rename experiments to examples and add testing for notebooks (disabled to save resources)

See merge request ai-lab-pmo/mltools/recsys/RePlay!122
Update CI 0.0.7

See merge request ai-lab-pmo/mltools/recsys/RePlay!123
merge v0.13.0 commit to main

See merge request ai-lab-pmo/mltools/recsys/RePlay!126
Little fixes in toml

See merge request ai-lab-pmo/mltools/recsys/RePlay!125
@shashist shashist changed the base branch from refactoring to main November 20, 2023 14:55
@shashist
Copy link
Collaborator

Please sync with main and I will rerun CI

@shashist shashist changed the base branch from main to refactoring November 22, 2023 06:20
@shashist shashist changed the base branch from refactoring to main November 22, 2023 12:23
tests/models/test_ucb.py Outdated Show resolved Hide resolved
tests/models/test_ucb.py Outdated Show resolved Hide resolved
replay/models/__init__.py Outdated Show resolved Hide resolved
replay/models/kl_ucb.py Outdated Show resolved Hide resolved
replay/models/kl_ucb.py Show resolved Hide resolved
@shashist
Copy link
Collaborator

Tests should be fixed. Currently they will result in ModuleNotFoundError: No module named 'pyspark' on gitlab (most recent) CI

@shashist shashist changed the base branch from main to refactoring December 1, 2023 11:18
@shashist shashist closed this Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants