cgpm
cgpm copied to clipboard
Design and implement incorporate for a View
Currently assumes that incorporate includes all the columns in the dim, so it is a the row-level not the cell-level. Incorporating on a cell-basis requires additional checking, for example ensuring that for an observed row there is not contradiction with the cluster assignment of other cols in the row.
For now I will put in an assertion that forces row-wise incorporate, until we figure out whether to deal with observations at the row-level or cell level, and only let State incorporate hypothetical rows.
"ensuring that for an observed row there is not contradiction with the cluster assignment of other cols in the row" - could you elaborate on that?
I will need to allow View to incorporate rows with missing values. My current strategy will be just to assign NaN
to the columns that are missing in the row to be incorporated. Any objection?
FYI, I added a failing test for this issue on commit bc53f703f054a7b1706075317fe703d46db1655d.
One solution was to fill in the missing values in view with nan.
e568ffbb7de67897eabf0d4f4d697bc2343a769a
Temporary workaround is to allow unincorporate of the last rowid only, which means we do not have to worry about re-indexing the rowids as they are guaranteed to remain contiguous. This behavior is sufficient for implementation of hypothetical rows in relevance search, where the State can incorporate K rows and then later unincorporate them
https://github.com/probcomp/cgpm/commit/54a3566f00ceed585ae2bf0a334a0402f7e9f5ee