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

Fix Risk Index calculation and add data sanitization #62

Merged
merged 3 commits into from
Aug 30, 2023

Conversation

yihuicai
Copy link
Contributor

@yihuicai yihuicai commented Jul 25, 2023

  1. The length of chunk_BG should be 20 to calculate ri_per_hour, since the gap between two records is 3 mins.
  2. The last element of chunk_BG may not be full. This will affect the accuracy of the ri_mean.
  3. np.mean() is no longer compatible (see Risk index calculation error in report generation #61 ) Use similar caculation in risk.py

@yihuicai yihuicai marked this pull request as ready for review July 25, 2023 07:18
Copy link
Owner

@jxx123 jxx123 left a comment

Choose a reason for hiding this comment

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

@yihuicai Would you mind adding a test for report.py? I know the code in report.py is really crappy, so it would be nice to have a test for it. Thank you for fixing the compatibility issue BTW! Really appreciate it.

@yihuicai
Copy link
Contributor Author

@yihuicai Would you mind adding a test for report.py? I know the code in report.py is really crappy, so it would be nice to have a test for it. Thank you for fixing the compatibility issue BTW! Really appreciate it.

Sure, just added a test for risk index report.

Copy link
Owner

@jxx123 jxx123 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 for adding the unit test! I will approve this change after you fix the minor naming and parameter default issues. Thanks again!

@yihuicai yihuicai requested a review from jxx123 August 29, 2023 02:22
Copy link
Owner

@jxx123 jxx123 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. LGTM.

@yihuicai
Copy link
Contributor Author

Seems the workflow didn't pass the test I wrote but did pass locally for me. I changed the accuracy of float number results. Let's see if it works.

@jxx123 jxx123 merged commit 6992154 into jxx123:master Aug 30, 2023
2 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

3 participants