Supporting all calibration targets with SparseMatrixBuilder #489
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #471
This is different from ensuring that the SparseMatrixBuilder produces the same matrix as the "new-cd-var" branch does. There is still functionality missing, such as target uprating or reconciliation across levels. However, given the assumption that a target value in the matrix is the value we want to calibrate to, the SparseMatrixBuilder can correctly compute each household's contribution to that target for ALL variables currently in the database.
I have separated this from implementing all the functionality for the target "preprocessing" that the "new-cd-var" branch does, as I believe there may be room to discuss if we want to do this within the matrix builder or maybe we should be separating responsibilities and doing it as an earlier step (this could mean updating the database with processed targets or other approaches).
Let me know if I missed any key variables by any chance. (Not all targets are tested in CI to not explode the matrix building step but I've made sure to test them locally and update the list in issue #471)