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

Further extension to the analysis module #564

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

Conversation

TinyMarsh
Copy link
Contributor

@TinyMarsh TinyMarsh commented Dec 9, 2024

This pull request introduces significant enhancements to the AnalysisModule class in the src/HealthGPS/analysis_module.cpp file. The main changes include the addition of a new method to calculate standard deviations and a new overload for the calculate_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 new calculated_stats vector rather than the series object.

  • Introduced a new overload of the calculate_index method that accepts a vector of factor values and computes the corresponding index in the calculated_stats_ vector. This is useful for when you know the factor values without having to pass a person object.

Closes #420
Closes #376

Copy link
Contributor

@github-actions github-actions bot left a 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

}

// Calculate in-place standard deviation.
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender sex, int age,
Copy link
Contributor

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]

Suggested change
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*/,

}

// Calculate in-place standard deviation.
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender sex, int age,
Copy link
Contributor

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]

Suggested change
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,

}

// Calculate in-place standard deviation.
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender sex, int age,
Copy link
Contributor

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,
                                                                                   ^

}

// Calculate in-place standard deviation.
auto divide_by_count_sqrt = [&](const std::string &chan, core::Gender sex, int age,
Copy link
Contributor

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,
                                                                          ^

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 0% with 57 lines in your changes missing coverage. Please review.

Project coverage is 50.87%. Comparing base (667200c) to head (4e9c8a2).

Files with missing lines Patch % Lines
src/HealthGPS/analysis_module.cpp 0.00% 57 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant