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

Diversity metric _ inter-list diversity #14

Merged
merged 10 commits into from
Jan 14, 2022
Merged

Conversation

takojunior
Copy link
Contributor

This pull request is for adding inter-list diversity to the recommender metrics. Since the implementation of inter-list diversity doesn't support the batch_accumulate usage, minor changes are applied to CombinedMetrics. New tests are added accordingly and all tests get passed. The other diversity metric planned to be added is intra-list diversity, while it could be better to get this one cleared first before having further additions to diversity metrics.

Signed-off-by: Xin Wang <xin.wang@fmr.com>
Signed-off-by: Xin Wang <xin.wang@fmr.com>
Copy link
Contributor

@dorukkilitcioglu dorukkilitcioglu left a comment

Choose a reason for hiding this comment

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

Went over the PR, and it looks great overall! Left a few comments on things that can change, primarily some documentation changes and reusing some code that was already a part of Jurity. Also left a few questions for my understanding.

The implementation of the metric itself looks good. Happy to approve once the two changes I mentioned above are done. Thanks for the fast return!

jurity/recommenders/interlist_diversity.py Outdated Show resolved Hide resolved
jurity/recommenders/combined.py Outdated Show resolved Hide resolved
jurity/recommenders/combined.py Show resolved Hide resolved
jurity/recommenders/combined.py Outdated Show resolved Hide resolved
jurity/recommenders/interlist_diversity.py Outdated Show resolved Hide resolved
jurity/recommenders/interlist_diversity.py Show resolved Hide resolved
jurity/recommenders/interlist_diversity.py Outdated Show resolved Hide resolved
jurity/recommenders/interlist_diversity.py Outdated Show resolved Hide resolved
jurity/recommenders/interlist_diversity.py Show resolved Hide resolved
jurity/recommenders/interlist_diversity.py Show resolved Hide resolved
docs/_sources/about_reco.rst.txt Outdated Show resolved Hide resolved
docsrc/about_reco.rst Outdated Show resolved Hide resolved
docsrc/conf.py Show resolved Hide resolved
jurity/recommenders/interlist_diversity.py Outdated Show resolved Hide resolved
jurity/recommenders/interlist_diversity.py Outdated Show resolved Hide resolved
jurity/recommenders/interlist_diversity.py Outdated Show resolved Hide resolved
jurity/recommenders/interlist_diversity.py Outdated Show resolved Hide resolved
jurity/recommenders/interlist_diversity.py Outdated Show resolved Hide resolved
tests/test_reco_combined.py Show resolved Hide resolved
@filip-michalsky
Copy link
Contributor

Thanks for the PR @takojunior !
Added few more comments and suggestions. I guess the biggest thing for me is to explain one step in the similarity calculation when calculating via chunks as the mathematical correctness was not clear to me.

I think @dorukkilitcioglu had few more important suggestions about the API signatures.

Signed-off-by: Xin Wang <xin.wang@fmr.com>
docsrc/about_reco.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@skadio skadio left a comment

Choose a reason for hiding this comment

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

@takojunior thank you for jumping on this quickly!

This was sitting in the backlog for a while and having the functionality available in Jury will help a lot to make the RecWiser notebooks leaner and facilitate our collaboration.

Some minor comments and 1 issue that worth considering before a Merge about the sample_size parameter and it's default behavior.

Great addition to Jurity!!

jurity/recommenders/interlist_diversity.py Outdated Show resolved Hide resolved
Signed-off-by: Xin Wang <xin.wang@fmr.com>
Signed-off-by: Xin Wang <xin.wang@fmr.com>
Signed-off-by: Xin Wang <xin.wang@fmr.com>
Signed-off-by: Xin Wang <xin.wang@fmr.com>
Signed-off-by: Xin Wang <xin.wang@fmr.com>
@takojunior
Copy link
Contributor Author

Thanks @skadio @filip-michalsky @dorukkilitcioglu for the constructive comments. A few updates have been applied to the PR. Please let me know if there are further comments.

jurity/utils.py Outdated Show resolved Hide resolved
Copy link
Contributor

@dorukkilitcioglu dorukkilitcioglu left a comment

Choose a reason for hiding this comment

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

The changes look good! Thanks for the contribution @takojunior!

@filip-michalsky
Copy link
Contributor

@takojunior all good, thanks a lot for the quick turnaround! I left few very minor comments, otherwise good to merge.

Signed-off-by: Xin Wang <xin.wang@fmr.com>
Signed-off-by: Xin Wang <xin.wang@fmr.com>
@takojunior takojunior merged commit 8061d4c into master Jan 14, 2022
@takojunior takojunior deleted the diversity_metric branch January 14, 2022 19:00
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.

4 participants