|
Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
|
Defines the static linear model data type. More...
#include <static_linear_model.h>
Public Member Functions | |
| StaticLinearModelDefinition (std::unique_ptr< RiskFactorSexAgeTable > expected, std::unique_ptr< std::unordered_map< core::Identifier, double > > expected_trend, std::unique_ptr< std::unordered_map< core::Identifier, int > > trend_steps, std::unique_ptr< std::unordered_map< core::Identifier, double > > expected_trend_boxcox, std::vector< core::Identifier > names, std::vector< LinearModelParams > models, std::vector< core::DoubleInterval > ranges, std::vector< double > lambda, std::vector< double > stddev, Eigen::MatrixXd cholesky, std::vector< LinearModelParams > policy_models, std::vector< core::DoubleInterval > policy_ranges, Eigen::MatrixXd policy_cholesky, std::unique_ptr< std::vector< LinearModelParams > > trend_models, std::unique_ptr< std::vector< core::DoubleInterval > > trend_ranges, std::unique_ptr< std::vector< double > > trend_lambda, double info_speed, std::unordered_map< core::Identifier, std::unordered_map< core::Gender, double > > rural_prevalence, std::unordered_map< core::Income, LinearModelParams > income_models, double physical_activity_stddev, TrendType trend_type=TrendType::Null, std::unique_ptr< std::unordered_map< core::Identifier, double > > expected_income_trend=nullptr, std::unique_ptr< std::unordered_map< core::Identifier, double > > expected_income_trend_boxcox=nullptr, std::unique_ptr< std::unordered_map< core::Identifier, int > > income_trend_steps=nullptr, std::unique_ptr< std::vector< LinearModelParams > > income_trend_models=nullptr, std::unique_ptr< std::vector< core::DoubleInterval > > income_trend_ranges=nullptr, std::unique_ptr< std::vector< double > > income_trend_lambda=nullptr, std::unique_ptr< std::unordered_map< core::Identifier, double > > income_trend_decay_factors=nullptr, bool is_continuous_income_model=false, const LinearModelParams &continuous_income_model=LinearModelParams{}, core::IncomeCategoryLayout income_category_layout={}, const std::unordered_map< core::Identifier, PhysicalActivityModel > &physical_activity_models={}, const std::vector< IncomeStratumExpectedTableEntry > &income_stratum_expected_tables={}, bool income_stratum_adjustment_enabled=false, std::size_t adjustment_income_stratum_count=0u, bool has_active_policies=true, std::vector< LinearModelParams > logistic_models={}, core::Gender gender2_indicator=core::Gender::male) | |
| Initialises a new instance of the StaticLinearModelDefinition class. | |
| std::unique_ptr< RiskFactorModel > | create_model () const override |
| Construct a new StaticLinearModel from this definition. | |
Public Member Functions inherited from hgps::RiskFactorAdjustableModelDefinition | |
| ~RiskFactorAdjustableModelDefinition () override=default | |
| Destroys a RiskFactorAdjustableModelDefinition instance. | |
| RiskFactorAdjustableModelDefinition (std::unique_ptr< RiskFactorSexAgeTable > expected, std::unique_ptr< std::unordered_map< core::Identifier, double > > expected_trend, std::unique_ptr< std::unordered_map< core::Identifier, int > > trend_steps, TrendType trend_type=TrendType::Null) | |
| Constructs a new RiskFactorAdjustableModelDefinition instance. | |
Public Member Functions inherited from hgps::RiskFactorModelDefinition | |
| virtual | ~RiskFactorModelDefinition ()=default |
| Destroys a RiskFactorModelDefinition instance. | |
Additional Inherited Members | |
Protected Attributes inherited from hgps::RiskFactorAdjustableModelDefinition | |
| std::shared_ptr< RiskFactorSexAgeTable > | expected_ |
| std::shared_ptr< std::unordered_map< core::Identifier, double > > | expected_trend_ |
| std::shared_ptr< std::unordered_map< core::Identifier, int > > | trend_steps_ |
| TrendType | trend_type_ |
Defines the static linear model data type.
| hgps::StaticLinearModelDefinition::StaticLinearModelDefinition | ( | std::unique_ptr< RiskFactorSexAgeTable > | expected, |
| std::unique_ptr< std::unordered_map< core::Identifier, double > > | expected_trend, | ||
| std::unique_ptr< std::unordered_map< core::Identifier, int > > | trend_steps, | ||
| std::unique_ptr< std::unordered_map< core::Identifier, double > > | expected_trend_boxcox, | ||
| std::vector< core::Identifier > | names, | ||
| std::vector< LinearModelParams > | models, | ||
| std::vector< core::DoubleInterval > | ranges, | ||
| std::vector< double > | lambda, | ||
| std::vector< double > | stddev, | ||
| Eigen::MatrixXd | cholesky, | ||
| std::vector< LinearModelParams > | policy_models, | ||
| std::vector< core::DoubleInterval > | policy_ranges, | ||
| Eigen::MatrixXd | policy_cholesky, | ||
| std::unique_ptr< std::vector< LinearModelParams > > | trend_models, | ||
| std::unique_ptr< std::vector< core::DoubleInterval > > | trend_ranges, | ||
| std::unique_ptr< std::vector< double > > | trend_lambda, | ||
| double | info_speed, | ||
| std::unordered_map< core::Identifier, std::unordered_map< core::Gender, double > > | rural_prevalence, | ||
| std::unordered_map< core::Income, LinearModelParams > | income_models, | ||
| double | physical_activity_stddev, | ||
| TrendType | trend_type = TrendType::Null, |
||
| std::unique_ptr< std::unordered_map< core::Identifier, double > > | expected_income_trend = nullptr, |
||
| std::unique_ptr< std::unordered_map< core::Identifier, double > > | expected_income_trend_boxcox = nullptr, |
||
| std::unique_ptr< std::unordered_map< core::Identifier, int > > | income_trend_steps = nullptr, |
||
| std::unique_ptr< std::vector< LinearModelParams > > | income_trend_models = nullptr, |
||
| std::unique_ptr< std::vector< core::DoubleInterval > > | income_trend_ranges = nullptr, |
||
| std::unique_ptr< std::vector< double > > | income_trend_lambda = nullptr, |
||
| std::unique_ptr< std::unordered_map< core::Identifier, double > > | income_trend_decay_factors = nullptr, |
||
| bool | is_continuous_income_model = false, |
||
| const LinearModelParams & | continuous_income_model = LinearModelParams{}, |
||
| core::IncomeCategoryLayout | income_category_layout = {}, |
||
| const std::unordered_map< core::Identifier, PhysicalActivityModel > & | physical_activity_models = {}, |
||
| const std::vector< IncomeStratumExpectedTableEntry > & | income_stratum_expected_tables = {}, |
||
| bool | income_stratum_adjustment_enabled = false, |
||
| std::size_t | adjustment_income_stratum_count = 0u, |
||
| bool | has_active_policies = true, |
||
| std::vector< LinearModelParams > | logistic_models = {}, |
||
| core::Gender | gender2_indicator = core::Gender::male |
||
| ) |
Initialises a new instance of the StaticLinearModelDefinition class.
| expected | The expected risk factor values by sex and age |
| expected_trend | The expected trend of risk factor values |
| trend_steps | The number of time steps to apply the trend |
| expected_trend_boxcox | The expected boxcox factor |
| names | The risk factor names |
| models | The linear models used to compute a person's risk factors |
| ranges | The value range of each risk factor |
| lambda | The lambda values of the risk factors |
| stddev | The standard deviations of the risk factors |
| cholesky | Cholesky decomposition of the risk factor correlation matrix |
| policy_models | The linear models used to compute a person's intervention policies |
| policy_ranges | The value range of each intervention policy |
| policy_cholesky | Cholesky decomposition of the intervention policy covariance matrix |
| trend_models | The linear models used to compute a person's risk factor trends |
| trend_ranges | The value range of each risk factor trend |
| trend_lambda | The lambda values of the risk factor trends |
| info_speed | The information speed of risk factor updates |
| rural_prevalence | Rural sector prevalence for age groups and sex |
| income_models | The income models for each income category |
| physical_activity_stddev | The standard deviation of the physical activity |
| trend_type | The type of trend to apply (Null, UPFTrend, or IncomeTrend) |
| expected_income_trend | The expected income trend of risk factor values |
| expected_income_trend_boxcox | The expected income trend boxcox factor |
| income_trend_steps | The number of time steps to apply the income trend |
| income_trend_models | The linear models used to compute income trends |
| income_trend_ranges | The value range of each income trend |
| income_trend_lambda | The lambda values of the income trends |
| income_trend_decay_factors | The exponential decay factors for income trends |
| is_continuous_income_model | Whether this model uses continuous income calculation (FINCH approach) |
| continuous_income_model | The continuous income model parameters (if using FINCH approach) |
| income_category_layout | Final income category buckets from project_requirements |
| HgpsException | for invalid arguments |
| logistic_models | |
| logistic_models | Logistic regression models for two-stage modeling (optional) |
|
overridevirtual |
Construct a new StaticLinearModel from this definition.
Implements hgps::RiskFactorModelDefinition.