WIP: Update Kalman Interface to accept setup matrices directly (in addition to LSS) #368
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
a proof of concept trial for accepting multiple interfaces for Kalman object,
Note: no updated docstrings yet. Setting up in Branch for collaboration.
This would allow
kalman
to accept the lecture example:in addition to
the key assumption is to check if the first element of the arguments list is an
LSS
object then it init's the object class (as per previously implemented) otherwise it constructs anLSS
object internally with the matrices and then set's up using anLSS
object.@natashawatkins is this what you had in mind for #354? I think you were suggesting to replace the acceptance of
LSS
altogether but the benefit here is that old code won't break and Kalman will continue to work with those packaging up A, C, and G in anLSS
object.The downside to this approach is it makes the introspected interface to
Kalman
harder to read due to accepting arbitrary arguments and keyword arguments to parse for various init methods.The key assumption here is that the argument list is checked and if the first element of the passed argument list is type
LinearStateSpace
then_init_lss
is used to populate the object otherise it is assumed that a user has passedA, C, and G
matrices.