HighDimensionalEconLab / DifferentiableStateSpaceModels.jl

MIT License
46 stars 1 forks source link

Change order for the 2nd order derivative tensors #154

Open jlperla opened 2 years ago

jlperla commented 2 years ago

The storage order for the A_2 and C_2 3-tensors should be reversed. This shoudl be done in conjunction with https://github.com/SciML/DifferenceEquations.jl/issues/54

Instead of a 3-tensor, the natural datastructure is a vector of matrices, which will make the calculation of likelihoods/etc. and simulatino much more convenient. Basically we want to have the transformation of the current structure from C_2 to C_2_new and then get rid of the old C_2.

C_2_new = [C_2[i, :, :] for i in 1:size(C_2, 1)] 

To do this,

After this is done, https://github.com/SciML/DifferenceEquations.jl/issues/54 can then be sync'd up - which might be required for the full unit tests to pass.