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

Update prepare_data.py #3

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

Conversation

Chandrababu-Namani
Copy link

@Chandrababu-Namani Chandrababu-Namani commented Jan 25, 2024

I encountered an issue in the prepare_data.py where an index out-of-bounds error occurs. After investigating, I found that the line causing the error is:
f = (f + 1) % 5
Because, it only works well when we do 5 fold cross validation.
To fix this issue and avoid the out-of-bounds error, I suggest updating the line to use a variable docs_per_fold instead of the hardcoded value 5:
f = (f + 1) % docs_per_fold

I encountered an issue with this line where an index out-of-bounds error occurs. 
To fix this issue and avoid the out-of-bounds error, I suggest updating the line to use a variable docs_per_fold instead of the hardcoded value 5:
f = (f + 1) % 5 to f = (f + 1) % docs_per_fold
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.

1 participant