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

Added users parameter in cross-validate #112

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nishantguvvada
Copy link

Description

Added users parameter in cross-validate.py to the request : #90

This will help to solve a common task to calculate metrics only on specific subset of users

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Optimization

How Has This Been Tested?

Before submitting a PR, please check yourself against the following list. It would save us quite a lot of time.

  • Have you read the contribution guide?
  • Have you updated the relevant docstrings? We're using Numpy format, please double-check yourself
  • Does your change require any new tests?
  • Have you updated the changelog file?

@@ -48,6 +48,7 @@ def cross_validate( # pylint: disable=too-many-locals
models: tp.Dict[str, ModelBase],
k: int,
filter_viewed: bool,
users: tp.Optional[ExternalIds] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi! Thank you for contribution!

Could you please add the following to your PR:

  1. Make users parameter as the last last one
  2. Add profound testing in tests/model_selection/test_cross_validate.py. Please ensure that math is correctly checked there. We believe that tests are really important
  3. Add your change in CHANGELOG.md

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the feedback, I'm on it.

Copy link
Author

Choose a reason for hiding this comment

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

  • I've moved the users parameter to the last
  • looking into the test_cross_validate.py

rectools/model_selection/cross_validate.py Outdated Show resolved Hide resolved
- Moved users to the last
- used dataset.user_id_map.convert_to_internal
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.

None yet

2 participants