Skip to content

Check that order of observed states coincide between build_statespace_graph and observed_state_names #556

@AlexAndorra

Description

@AlexAndorra

We need to add a check on the data passed to build_statespace_graph: currently, it doesn't make sure that the order of the columns in the dataframe is the same as the list of observed states passed to observed_state_names by the user.

This will cause unexpected behavior for multivariate time series: the model will run, but the indices of the time series will be messed up. For instance, if I pass my observed_state_names in the chronological order (one president, then the next in history let's say), but then I pass a dataframe whose columns are sorted alphabetically, the resulting time series will be misaligned.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions