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 _monitoring.py to prevent failure of monitoring_plot when sample size is <50. #2877

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bhanudaysharma
Copy link

If the sample size is <50, the 'inc' becomes greater than or equal to len(ys)-inc. As a result, the subsequent 'for loop' does not run. Hence, the list pvals remains empty. As a result, np.min(pvals) fails resulting in the failure of the entire monitoring_plot function. So, I corrected this error by adding a check before the for looop. If (inc < len(ys)-inc), the t-test is skipped and a Warning is produced to prevent the failure of function of monitoring_plot.

Also, added 'inc' in the function arguments to allow users to choose 'inc' value at runtime. Kept the default value of 'inc' as 50 for backward compatibility.

If the 'inc' is greater than or equal to len(ys)-inc, the subsequent for loop does not run. Hence, the list pvals remains empty. As a result, np.min(pvals) fails resulting in failure of the entire monitoring_plot function. So, I corrected this error by allowing the user to choose 'inc' value at runtime by passing it as an argument to the function. Set the default value as 50 for backward compatibility. If (inc < len(ys)-inc), the t-test is skipped and a Warning is produced to prevent the failure of function of monitoring_plot.
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

1 participant