HighDimensionalEconLab / DifferentiableStateSpaceModels.jl

MIT License
46 stars 1 forks source link

Unit tests for FVGQ first order underlying gradient objects #114

Closed jlperla closed 2 years ago

jlperla commented 2 years ago

If that passes, at least we know that the underlying calculations aren't broken.

We should be very careful to ensure we don't let floating point calculations be loose for this. It should be very close.

jlperla commented 2 years ago

118 This will fulfill it largely. We can keep it open temporarily because with FVGQ it might be necessary to see where the issues arise.

jlperla commented 2 years ago

@wupeifan Save out c.h_x_p and c.g_x_p from the old code for the gradient wrt only the beta parameter. I think all we really need to do is have the c.h_x_p to see if things changed. If it did, it gives us a target to find the discrepancy and we can get fancier with unit tests after we fix the problem. If these values are the same as the current (buggy) code then it leads us down a different path.

When we have those values, add it to the unit test hardcoded in https://github.com/HighDimensionalEconLab/DifferentiableStateSpaceModels.jl/blob/main/test/FVGQ20.jl#L112

But like I said, I think all we really need is the c.h_x_p for the beta one for now.

jlperla commented 2 years ago

Unit tests now passing for gradients