cgpm
cgpm copied to clipboard
Support State.transition_lovecat with non-normal/categorical primitive cgpms
Currently, an error is thrown if the user tries to invoked State.transition_lovecat with non-normal/categorical columns.
https://github.com/probcomp/cgpm/blob/master/src/crosscat/state.py#L492-L495
The difficulty is that lovecat requires X_L to have entries for the column hyperparameters. If the State object does not model columns using normal/categorical, then lovecat._crosscat_X_L cannot correctly generate the dictionary for column hypers.
The solution is the following:
- Teach
lovecat._crosscat_X_Lto use some default hyperparameters for non-normal/categorical columns. - Run a single column transition from lovecat to obtain good initial values of the column hypers that match the row partitions.
- Run full lovecat Gibbs sweeps as we do now.
- Run a single cgpm column hyper sweep, as we do now, updating the hypers based on the returned lovecat partitions.