UnKronPolicyIndexes

Not something most users will ever see, but internally the model dimensions get folded down into ‘Kron’, the model is solved, and then ‘UnKron’ unfolds them to pass back to user. For example, a model with two markov states looks like (…,z1,z2,…) to the user, but internally will be done with (…,z,…) where z has length prod(n_z) and is both z1 and z2.

I just did a big overhaul of the ‘UnKron’ commands, impacting all the FHorz and FHorz TPath commands. Will hopefully get to do the same with the InfHorz and InfHorz TPath commands this week.

Just mentioning for anyone who does look at the internals, so they know this has changed.

For most users this will look like shaving a few hundredths of a second off some of the runtimes. Previously I had to do some unnecessary extra-folding before using the ‘UnKron’ to unfold. The new ‘UnKron’ are more flexible/general, and so the reworking has eliminated this ‘extra folding’.

Main point of the reworking was that the new approach is just nicer and cleaner. Better designed to handle all the kinds of cases that arise. The old approach was something I had build, and then just kind of bolted on to new situations as those arose.

The old UnKron commands are still there, but I’m planning to eliminate them after I migrate the InfHorz commands over.

2 Likes