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

Fixed bug with LexRank's power iteration #194

Merged
merged 4 commits into from
Aug 11, 2023
Merged

Fixed bug with LexRank's power iteration #194

merged 4 commits into from
Aug 11, 2023

Conversation

AryazE
Copy link
Contributor

@AryazE AryazE commented Jun 5, 2023

The power_method in summarizers/lex_rank.py was not correct. The lambda_val was increasing for this test and hence resulted in inf and nan values reported in #187 (also a warning would be raised when running that test).
The problem was that the next_p vector should have been normalized after the matrix multiplication according to the Wikipedia entry, which it was not.

Copy link
Owner

@miso-belica miso-belica left a comment

Choose a reason for hiding this comment

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

Hello, thank you for the PR. Can you please add test for this? Maybe from the referenced issue? Something that fails before your fix 🙂 Thank you

@AryazE
Copy link
Contributor Author

AryazE commented Aug 10, 2023

Done! ✔️

@miso-belica miso-belica self-requested a review August 10, 2023 10:03
Copy link
Owner

@miso-belica miso-belica left a comment

Choose a reason for hiding this comment

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

Thank you 💯

@miso-belica miso-belica merged commit 4f06a6c into miso-belica:main Aug 11, 2023
11 of 12 checks passed
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