cgpm icon indicating copy to clipboard operation
cgpm copied to clipboard

Design and implement incorporate for a View

Open fsaad opened this issue 8 years ago • 4 comments

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.

fsaad avatar May 25 '16 15:05 fsaad

"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?

leocasarsa avatar Oct 05 '16 02:10 leocasarsa

FYI, I added a failing test for this issue on commit bc53f703f054a7b1706075317fe703d46db1655d.

leocasarsa avatar Oct 05 '16 02:10 leocasarsa

One solution was to fill in the missing values in view with nan.

e568ffbb7de67897eabf0d4f4d697bc2343a769a

leocasarsa avatar Oct 17 '16 19:10 leocasarsa

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

fsaad avatar Feb 21 '17 17:02 fsaad