Skip to content

Add initial factorial API#178

Draft
SamDuffield wants to merge 33 commits intomainfrom
factorial
Draft

Add initial factorial API#178
SamDuffield wants to merge 33 commits intomainfrom
factorial

Conversation

@SamDuffield
Copy link
Contributor

My first attempt at a factorial API. I appreciate it's quite a lot of code added (and this is just to support Gaussian methods). Happy to break it up into multiple PRs if we think that's easier to grasp and there's a logical way to do so.

In terms of modifications to the existing cuthbert code I think they are minimal. I just had to change the init_prepare in Kalman so that it doesn't actually touch the observation parameters if the observation y is all nans. This is to avoid mismatching dimensions because in this factorial API the initial step is very different (acts globally across factors) to the subsequent steps (acts locally only on selected factors). (I think we'll also have to change this for the other methods too)

If anything is unclear please shout and I can document better!

SamDuffield and others added 2 commits February 6, 2026 09:57
Co-authored-by: Sahel Iqbal <sahel13miqbal@proton.me>
@SamDuffield SamDuffield marked this pull request as draft February 7, 2026 13:41
@SamDuffield
Copy link
Contributor Author

Converting to draft until we decide how to support an absent initial observation

@SamDuffield
Copy link
Contributor Author

@AdrienCorenflos recommends having synchronize method that brings all factors to the same time (as currently they are always asynchronous).

@SamDuffield SamDuffield marked this pull request as ready for review February 24, 2026 11:43
@SamDuffield SamDuffield requested a review from Sahel13 February 24, 2026 11:51
@SamDuffield
Copy link
Contributor Author

Updated after #191 to work with new convention of no initial observation. I think the factorial API is quite clean! It should be easy to extend to discrete and particle methods - although that can be different PR(s)

@SamDuffield
Copy link
Contributor Author

Not sure why the Github Action with the tests keeps cancelling itself

@SamDuffield SamDuffield marked this pull request as draft February 26, 2026 12:00
@SamDuffield
Copy link
Contributor Author

I'm now thinking it will be useful to split extract_and_join into separate extract and join functions for better usability. Similar marginalize_and_insert. Marking as draft as a result 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants