-
Notifications
You must be signed in to change notification settings - Fork 1
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
Further extension to the analysis module #564
base: extend_analysis
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
src/HealthGPS/analysis_module.cpp
Outdated
} | ||
|
||
// Calculate in-place standard deviation. | ||
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender sex, int age, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: parameter 'age' is unused [misc-unused-parameters]
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender sex, int age, | |
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender sex, int /*age*/, |
src/HealthGPS/analysis_module.cpp
Outdated
} | ||
|
||
// Calculate in-place standard deviation. | ||
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender sex, int age, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: parameter 'sex' is unused [misc-unused-parameters]
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender sex, int age, | |
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender /*sex*/, int age, |
src/HealthGPS/analysis_module.cpp
Outdated
} | ||
|
||
// Calculate in-place standard deviation. | ||
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender sex, int age, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unused parameter 'age' [clang-diagnostic-unused-parameter]
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender sex, int age,
^
src/HealthGPS/analysis_module.cpp
Outdated
} | ||
|
||
// Calculate in-place standard deviation. | ||
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender sex, int age, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unused parameter 'sex' [clang-diagnostic-unused-parameter]
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender sex, int age,
^
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## extend_analysis #564 +/- ##
===================================================
- Coverage 51.21% 50.87% -0.35%
===================================================
Files 165 165
Lines 8370 8427 +57
Branches 1070 1078 +8
===================================================
Hits 4287 4287
- Misses 4074 4131 +57
Partials 9 9 ☔ View full report in Codecov by Sentry. |
This pull request introduces significant enhancements to the
AnalysisModule
class in thesrc/HealthGPS/analysis_module.cpp
file. The main changes include the addition of a new method to calculate standard deviations and a new overload for thecalculate_index
method to handle vector inputs.Added the
calculate_standard_deviation
method to compute the standard deviation for various risk factors, based on the current population context. Uses the newcalculated_stats
vector rather than theseries
object.Introduced a new overload of the
calculate_index
method that accepts a vector of factor values and computes the corresponding index in thecalculated_stats_
vector. This is useful for when you know the factor values without having to pass aperson
object.Closes #420
Closes #376