-
Notifications
You must be signed in to change notification settings - Fork 0
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
22 cumulative imputation links are incorrect for fic #29
22 cumulative imputation links are incorrect for fic #29
Conversation
The imputation_group column should look at imputation_marker for changes instead of missing_value
To fix a bug with cummulative links we are using imputation marker Add a new column with imputation marker to test data Adapt tests accordingly
The markers in the dictionary must be the same as the ones created from imputation_flags
If we use constructed column this won't allow the forward fill which will then be used to multiple columns, we are using imputed_value which has na if relevant row is not constructed
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.
Not very familiar with the bug so would want to check with someone else whether the test data covers it. Have left a couple of questions and suggestions on the code but most of them are very small
src/apply_imputation_link.py
Outdated
"fill_column": target, | ||
"fill_method": "bfill", | ||
"link_column": cumulative_backward_link, | ||
}, | ||
"fic": { | ||
# FIC only works if the C is in the first period of the business being |
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.
Has this issue been resolved?
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.
@robertswh i think it is resolved?
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.
By accident i removed these comments from the code, i will re add them in the original code.
This pull request is not related what is being mentioned in the comments, the comments are related to the manual construction methods and things we must be aware of.
We changed the approach and this is reflected to the test data ( added a new column for marker). As described at #22 , instead of looking at time difference , the code now looks at imputation marker difference. So yes it is covered. The other bugs are related how functions work together, and getting them ready for the imputation wrapper |
a9d1391
to
db93653
Compare
The imputation_group column should look at imputation_marker for changes instead of missing_value
To fix a bug with cummulative links we are using imputation marker Add a new column with imputation marker to test data Adapt tests accordingly
The markers in the dictionary must be the same as the ones created from imputation_flags
If we use constructed column this won't allow the forward fill which will then be used to multiple columns, we are using imputed_value which has na if relevant row is not constructed
…https://github.com/ONSdigital/monthly-business-survey-results into 22-cumulative-imputation-links-are-incorrect-for-fic
Rebased the branch to main to resolve conflicts caused by changing folder name src -> mbs_results |
Summary
This pull request aims to fix some bugs as outlined in the #22 , tests and test data adapted accordingly
Checklists
This pull request meets the following requirements:
If you feel some of these conditions do not apply for this pull request, please
add a comment to explain why.