Closed nilsnevertree closed 1 year ago
With this the call of a function would change from
test = pipeline.xarray_Kalman_SEM(
ds=data,
observation_variables=["x2", "x3"],
random_variables=["z1", "z2"],
nb_iter_SEM=10,
variance_obs_comp=0.0001,
)
to
test = pipeline.xarray_Kalman_SEM(
ds=data,
observation_variables=["x2", "x3", "z1", "z2"],
state_variables=["x2", "x3"],
nb_iter_SEM=10,
variance_obs_comp=0.0001,
)
It would be applicable to arange that the same keys in the two arrays observations_varibles
and state_variables
are at same position.
pipeline.xarray_Kalman_SEM(
ds=data,
observation_variables=["x2", "x3"],
state_variables=["x2", "z1", "x3", "z2"],
nb_iter_SEM=10,
variance_obs_comp=0.0001,
)
Result
pipeline.xarray_Kalman_SEM(
ds=data,
observation_variables=["x2", "x3"],
state_variables=["x2", "x3", "z1", "z2"],
nb_iter_SEM=10,
variance_obs_comp=0.0001,
)
Result
An option is to sort the arrays. This is implemented in commit #90e012e This solves the problem
The argument random_variables is not very general.
It might be better to use
state_variables
as this is the name used for most of the documentation