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

Required Coefficients File Not Backwards Compatible or Documented #331

Closed
danielsclint opened this issue Aug 24, 2020 · 2 comments
Closed

Comments

@danielsclint
Copy link

Pull Request #325 introduced a new requirement that each model define a "coefficients" file. This makes the structure of the config files cleaner in the long run. However, the documentation has not been updated (as far as I can tell) to reflect this new requirement, and it breaks prior setups (e.g., ARC implementation) that does not abide by this standard.

assert 'COEFFICIENTS' in model_settings, \
"'COEFFICIENTS' tag not in model_settings in %s" % model_settings.get('source_file_paths')
file_name = model_settings['COEFFICIENTS']

We will update the ARC code base appropriately to follow the rules.

Might be worth discussing whether this new feature should truly be a requirement or whether it should just be strongly recommended.

@danielsclint
Copy link
Author

The COEFFICIENTS and COEFFICIENTS_TEMPLATE seem prone to user input error with all of the mappings between COEFFICIENT names, COEFFICIENT_TEMPLATE aliases, and actual usage in the the model specification or YAML file. Could the same logic in the COEFFECIENTS and COEFFICIENTS_TEMPLATE table be handled in a slightly more verbose single table?

PROPOSED COEFFICIENT TABLE SCHEMA (used to map specific coefficient names to generic names)

coefficient_name segment_name value constrain
coef_ivt default -0.0175 F
coef_ivt school_univ -0.0224 F
coef_ivt work -0.0134 F
coef_ivt at_work -0.0188 F

In the table above, the segment name would be read and applied to the specific segment when available. The default segment would be used if no other segment matches and is assumed to be universal.

This seems easier than the current implementation which requires keeping multiple files in sync.

EXISTING COEFFICIENT TEMPLATE TABLE (used to map specific coefficient names to generic names)

coefficient_name eatout escort othdiscr othmaint school shopping social univ work atwork
coef_ivt coef_ivt_eatout_escort_othdiscr_othmaint_shopping_social coef_ivt_eatout_escort_othdiscr_othmaint_shopping_social coef_ivt_eatout_escort_othdiscr_othmaint_shopping_social coef_ivt_eatout_escort_othdiscr_othmaint_shopping_social coef_ivt_school_univ coef_ivt_eatout_escort_othdiscr_othmaint_shopping_social coef_ivt_eatout_escort_othdiscr_othmaint_shopping_social coef_ivt_school_univ coef_ivt_work coef_ivt_atwork

EXISTING COEFFICIENT TABLE

coefficient_name value constrain
coef_ivt_eatout_escort_othdiscr_othmaint_shopping_social -0.0175 F
coef_ivt_school_univ -0.0224 F
coef_ivt_work -0.0134 F
coef_ivt_atwork -0.0188 F

(Admittedly, I've been out of the loop for a while, so I could clearly be missing the importance of this extra step too)

@danielsclint
Copy link
Author

This was implemented to support Larch, and the implementation is more clear. Closing this issue.

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

No branches or pull requests

1 participant